summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Add CTASSERT()'s to check that the sizes of our replicas of the 32 bitpeter2003-10-303-5/+26
| | | | | | | | | | structures come out the right size. Fix the ones that broke. stat32 had some missing fields from the end and statfs32 was broken due to the strange definition of MNAMELEN (which is dependent on sizeof(long)) I'm not sure if this fixes any actual problems or not.
* avoid recursive lock panic by unlocking before calling rtrequest;sam2003-10-291-1/+2
| | | | | | | | this is consistent with other places but will be replaced shortly by a "proper fix" Supported by: FreeBSD Foundation Pain felt by: Jiri Mikulas
* correct LOR by using a local variable to hold resultsam2003-10-291-3/+5
| | | | | | instead of holding a lock while calling out of view Supported by: FreeBSD Foundation
* Don't attempt to destroy the driver mutex when it hasn't yetdeischen2003-10-291-1/+1
| | | | | | been created. This has been sitting in my local tree for far too long; I can't believe noone else has come across this yet.
* Fix a panic that occurs when resuming. For some reason, sc->cur_scp isnjl2003-10-292-0/+7
| | | | | | NULL. Submitted by: Andrew Thompson <andy@fud.org.nz>
* Potential fix for races shutting down callouts when unloadingsam2003-10-291-2/+6
| | | | | | | | | | the module. Previously we grabbed the mutex used by the callouts, then stopped the callout with callout_stop, but if the callout was already active and blocked by the mutex then it would continue later and reference the mutex after it was destroyed. Instead stop the callout first then lock. Supported by: FreeBSD Foundation
* o add locking to protect routing table refcnt manipulationssam2003-10-291-16/+18
| | | | | | | | | | o add some more debugging help for figuring out why folks are getting complaints about releasing routing table entries with a zero refcnt o fix comment that talked about spl's o remove duplicate define of DUMMYNET_DEBUG Supported by: FreeBSD Foundation
* Always queue looped back packets (rather than potentially usingsam2003-10-291-1/+1
| | | | | | | direct dispatch) to avoid extensive kernel stack usage and to avoid directly re-entering the network stack. The latter causes locking problems when, for example, a complete TCP handshake` happens w/o a context switch.
* mark interrupt handlers MPSAFEsam2003-10-293-3/+3
|
* Add a temporary mechanism to disble INTR_MPSAFE from network interfacesam2003-10-291-0/+13
| | | | | drivers. This is prepatory to running more parts of the network system w/o Giant.
* Removed mostly-dead code for setting switchtime after the idle loopbde2003-10-292-11/+2
| | | | | | | | | | | | | | | | | | | | | | clobbers this variable. Long ago, when the idle loop wasn't in a process, it set switchtime.tv_sec to zero to indicate that the time needs to be read after the idle loop finishes. The special case for this isn't needed now that there is an idle process (for each CPU). The time is read in the normal way when the idle process is switched away from. The seconds component of the time is only zero for the first second after the uptime is set, and the mostly-dead code was only executed during this time. (This was slightly broken by using uptimes instead of times relative to the Epoch -- in the original version the seconds component of the time was only 0 for the first second after the Epoch.) In mi_switch(), moved the setting of switchticks to just after the first (and now only) setting of switchtime. This setting used to be delayed since a late setting was needed for the idle case and an early setting was not needed. Now the early setting is needed so that fork_exit() doesn't need to set either switchtime or switchticks. Removed now-completely-rotted comment attached to this. Most of the code described by the comment had already moved to sched_switch().
* Allow sending of more than one raw cell from a single mbuf. Only theharti2003-10-291-8/+11
| | | | | | | | | | | | very first cell in the mbuf should have a cell header word (of which everything except the payload type and the CLP bit is ignored). All other cells should be 48 byte and get the same header as the first cell. This fixes a problem with sending more than 120000 raw cells/sec through an HE155. The card seems to need 2 cell times to DMA the transmit buffer ready queue entry and the transmit buffer descriptor so at 1/3 the link rate the transmit buffer ready queue starts to fill up. Even with this patch it's obviously impossible to send raw cells at link rate.
* Remove a superfluous ) from the previous commit. This was obviouslyharti2003-10-291-1/+1
| | | | a result of the current solar storm.
* Make the maximum number of pages for external mbufs configurable inharti2003-10-293-2/+7
| | | | | | | the kernel environment and accessible as a RO sysctl. Explain that the HE155 will not work in 64-bit/66MHz slots, but may work in 64-bit/33MHz slots.
* add ECN support in layer-3.ume2003-10-2910-54/+186
| | | | | | | | | - implement the tunnel egress rule in ip_ecn_egress() in ip_ecn.c. make ip{,6}_ecn_egress() return integer to tell the caller that this packet should be dropped. - handle ECN at fragment reassembly in ip_input.c and frag6.c. Obtained from: KAME
* Removed sched_nest variable in sched_switch(). Context switches alwaysbde2003-10-293-7/+1
| | | | | | | | | | | | | | | | | begin with sched_lock held but not recursed, so this variable was always 0. Removed fixup of sched_lock.mtx_recurse after context switches in sched_switch(). Context switches always end with this variable in the same state that it began in, so there is no need to fix it up. Only sched_lock.mtx_lock really needs a fixup. Replaced fixup of sched_lock.mtx_recurse in fork_exit() by an assertion that sched_lock is owned and not recursed after it is fixed up. This assertion much match the one in mi_switch(), and if sched_lock were recursed then a non-null fixup of sched_lock.mtx_recurse would probably be needed again, unlike in sched_switch(), since fork_exit() doesn't return to its caller in the normal way.
* Make the value of the HATM_DEBUG symbol the default for the debuggingharti2003-10-293-13/+15
| | | | flags. Introduce a new debugging flag to dump received packets.
* Inline a function that was called only in one place directly into that place.harti2003-10-292-72/+72
| | | | | | Correct a bug when the number of pages for external mbufs was very large. In this case the page number could overflow into the large buffer flag. Make this more unlikley by move that flag further away.
* Alphabetical order for ACPI options broken by adding ACPI_NO_RESET_VIDEO.iwasaki2003-10-292-2/+5
| | | | | | Add short comment about ACPI_NO_RESET_VIDEO into NOTES. Pointed-out by: njl
* We have some space in the external mbufs so use this space forharti2003-10-292-2/+5
| | | | | the external buffer reference count. This saves us a malloc() + free() per small receive mbuf.
* Defer allocation of the actual receive mbuf until the external bufferharti2003-10-294-29/+30
| | | | | | | | | | is returned from the card to the driver. Add a counter that shows how many times this allocation has failed. Note, that we could even further delay the allocation of the mbuf until we know, that we need it (there are no receive errors and the connection is open). This will be done in a later commit. Print the new statistics field in atmconfig.
* Get rid of the mutexes for the exernal buffer free lists. Useharti2003-10-293-52/+51
| | | | | | atomic instructions instead. Remove the stuff used to track whether an external mbuf travels through the system. This is temporary only and will come back soon.
* ip6_savecontrol() argument is redundantume2003-10-296-15/+12
|
* hide m_tag, again.ume2003-10-293-38/+21
| | | | Requested by: sam
* - Synchronize updates to nswapdev using sw_dev_mtx.alc2003-10-291-2/+2
|
* Fix the alpha tinderbox. The alpha specific bitops used by the bitmapmarcel2003-10-294-12/+4
| | | | | | | | | | code has the typical branch prediction detour, which creates cross- section branches. A LINT kernel is apparently large enough nowadays that the .text and .text2 sections cannot always be layed-out so that branches between them reach. The fix is to stop using the alpha-specific bitops and instead use the portable implementation used by all platforms other than alpha and i386.
* - Avoid a race in swaponsomething(): Calculate the new swdevt's first andalc2003-10-291-17/+14
| | | | | end swblk and insert this new swdevt into the list of swap devices in the same critical section.
* Introduce the notion of "persistent mbuf tags"; these are tags that staysam2003-10-294-1/+36
| | | | | | | | | | | | | | with an mbuf until it is reclaimed. This is in contrast to tags that vanish when an mbuf chain passes through an interface. Persistent tags are used, for example, by MAC labels. Add an m_tag_delete_nonpersistent function to strip non-persistent tags from mbufs and use it to strip such tags from packets as they pass through the loopback interface and when turned around by icmp. This fixes problems with "tag leakage". Pointed out by: Jonathan Stone Reviewed by: Robert Watson
* This commit was generated by cvs2svn to compensate for changes in r121642,marcel2003-10-2929-572/+773
|\ | | | | | | which included commits to RCS files with non-trunk default branches.
| * Import beta6 of libuwx. This release has some minor fixes andmarcel2003-10-2929-572/+773
| | | | | | | | some minor corrections to beta5.
* | Add kernel option ACPI_NO_RESET_VIDEO as workaround for problemsiwasaki2003-10-294-0/+8
| | | | | | | | | | (e.g. LCD white-out after resume) on some machine cased by re-initialize video BIOS code in acpi_wakecode.
* | Cleanup the interrupt code that deals with the busmaster bits.sos2003-10-281-47/+58
| |
* | Use VLANNAME instead of "vlan".brooks2003-10-281-4/+4
| |
* | According to the submitter, POSIX mandates that all interval timers arejhb2003-10-281-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | reset in a child process after a fork(). Currently, however, only the real timer is cleared while the virtual and profiling timers are inherited. The realtimer is cleared because it lives directly in struct proc in p_realtimer. It is in the zero'd section of struct proc. The other timers live in the p_timer[] array in struct pstats. These timers are copied on fork() rather than zero'd. The fix is to move p_timer[] to the zero'd part of struct pstats so that they are zero'd instead of copied on fork(). Note: Since at least FreeBSD 2.0 (and possibly earlier) we've had storage for two real interval timers. Now that the uarea is less important, perhaps we could move all of p_timer[] over to struct proc and drop the p_realtimer special case to fix that. PR: kern/58647 Reported by: Dan Nelson <dnelson@allantgroup.com> MFC after: 1 week
* | When switching the RSE to use the kernel stack as backing store, keepmarcel2003-10-287-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the RNAT bit index constant. The net effect of this is that there's no discontinuity WRT NaT collections which greatly simplifies certain operations. The cost of this is that there can be up to 504 bytes of unused stack between the true base of the kernel stack and the start of the RSE backing store. The cost of adjusting the backing store pointer to keep the RNAT bit index constant, for each kernel entry, is negligible. The primary reasons for this change are: 1. Asynchronuous contexts in KSE processes have the disadvantage of having to copy the dirty registers from the kernel stack onto the user stack. The implementation we had so far copied the registers one at a time without calculating NaT collection values. A process that used speculation would not work. Now that the RNAT bit index is constant, we can block-copy the registers from the kernel stack to the user stack without having to worry about NaT collections. They will be in the right place on the user stack. 2. The ndirty field in the trapframe is now also usable in userland. This was previously not the case because ndirty also includes the space occupied by NaT collections. The value could be off by 8, depending on the discontinuity. Now that the RNAT bit index is contants, we have exactly the same number of NaT collection points on the kernel stack as we would have had on the user stack if we didn't switch backing stores. 3. Debuggers and other applications that use ptrace(2) can now copy the dirty registers from the kernel stack (using ptrace(2)) and copy them whereever they want them (onto the user stack of the inferior as might be the case for gdb) without having to worry about NaT collections in the same way the kernel doesn't have to worry about them. There's a second order effect caused by the randomization of the base of the backing store, for it depends on the number of dirty registers the processor happened to have at the time of entry into the kernel. The second order effect is that the RSE will have a better cache utilization as compared to having the backing store always aligned at page boundaries. This has not been measured and may be in practice only minimally beneficial, if at all measurable.
* | This should allow us to boot with DMA enabled on unknown PCI ATAsos2003-10-282-25/+48
| | | | | | | | chipsets, well at least newer ones...
* | Directly call the 'reboot' word instead of indirectly evaluating it.scottl2003-10-281-1/+1
| |
* | make sure to accept only IPv6 packet.ume2003-10-281-0/+3
| | | | | | | | Obtained from: KAME
* | cleanup use of m_tag.ume2003-10-285-77/+69
| | | | | | | | Obtained from: KAME
* | mib name was changed by fixing a spelling.ume2003-10-281-1/+1
| | | | | | | | | | | | net.key.prefered_oldsa -> net.key.preferred_oldsa Obtained from: KAME
* | speedup stream socket recv handling by tracking the tail ofsam2003-10-289-49/+371
| | | | | | | | | | | | | | the mbuf chain instead of walking the list for each append Submitted by: ps/jayanth Obtained from: netbsd (jason thorpe)
* | - Only change the run queue in sched_prio() if the kse is non null. threadsjeff2003-10-281-10/+2
| | | | | | | | | | | | can be in the TD_ON_RUNQ state and not have an associated kse. - Remove the PRI_IDLE special case from sched_clock(), it was not actually necessary.
* | Oops. Remove some rather noisy debug printfs that slipped in therepeter2003-10-281-9/+0
| | | | | | | | somehow.
* | The previous commit removed both clause 3 and clause 4 from the UCBmarcel2003-10-272-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | license. Only clause 3 has been revoked. Restore the fourth clause as clause 3. Pointed out by: das@ Remove my name as a copyright holder since I don't use a BSD license compatible or comparable to the UCB license. I choose not to add a complete second license for my work for aesthetic reasons, nor to replace the UCB license on grounds of rewriting more than 90% of the source files. The rewrite can also be seen as an enhancement and since the files were practically empty, it's rather trivial to have changed 90% of the files.
* | Fix pmap_unmapdev() to call pmap_kremove() instead of implementing itjhb2003-10-271-5/+2
| | | | | | | | | | directly so that it more closely mirrors pmap_mapdev() which calls pmap_kenter().
* | Directly call the 'boot' word instead of indirectly evaluating it.scottl2003-10-271-7/+7
| | | | | | | | Submitted by: dcs
* | When we cannot allocate an external buffer (bacause we've hitharti2003-10-271-9/+5
| | | | | | | | | | | | | | | | | | | | | | the maximum number of pages for buffers) return -1 instead of 0. This fixes a panic under conditions when many mbufs are needed. Update the head pointer of the receive buffer pool queue even when we could not supply a buffer to the chip. Otherwise the chip will not re-interrupt us for another try. A better strategy would probably be to remember this condition and to supply buffers without an interrupt as soon as buffers get available.
* | Allow building the NgATM SAAL layer directly into the kernel.harti2003-10-274-2/+17
| |
* | - Don't set td_priority directly here, use sched_prio().jeff2003-10-271-1/+1
| |
* | M_DONTWAIT was passed into malloc().ume2003-10-271-2/+2
| | | | | | | | Submitted by: Ian Dowse <iedowse@maths.tcd.ie>
OpenPOWER on IntegriCloud