yar [Fri, 10 Feb 2006 11:01:10 +0000 (11:01 +0000)]
Avoid frobbing IFF_UP at any cost (which is close to
zero in this case.) A kernel driver has IFF_DRV_RUNNING
at its full disposal while IFF_UP may be toggled only by
humans or their daemonic deputies from the userland.
sam [Thu, 9 Feb 2006 22:34:34 +0000 (22:34 +0000)]
Minor tx path cleanups:
o assume all data frames have been classified so there's no need
to check if QoS is being used, just fetch the wme priority from
the mbuf
o fix double counting of noack frames
o fix nearby comment
sam [Thu, 9 Feb 2006 22:21:53 +0000 (22:21 +0000)]
Beacon timer setup fixes:
o pull nexttbtt forward in adhoc mode too
o resync beacon timers on joining a bss or ibss as the tstamp we
collected while scanning is almost certainly out of date
Note we may need to refine the ibss mode check in ath_recv_mgmt.
sam [Thu, 9 Feb 2006 22:03:26 +0000 (22:03 +0000)]
Phantom beacon miss workaround: track the tsf of the last received
frame and if we get a beacon miss interrupt ignore it if we've received
a frame within the beacon miss interval. This should never trigger
and the handling at the net80211 layer should likewise deal with this
but it doesn't hurt and can suppress extranous probe request frames.
Note that we can legtimately get a bmiss when under heavy load.
sam [Thu, 9 Feb 2006 20:57:48 +0000 (20:57 +0000)]
lower try count on mgt (and ctl) frames to avoid clogging the tx queue
and loading the bss when operating in ap mode under load; adjust recognition
of multi-rate retry to match
sam [Thu, 9 Feb 2006 20:49:55 +0000 (20:49 +0000)]
move mgt frame tx rate responsibility from the rate control modules
to the driver; this avoids redundant logic and will be necessary
for future additions
delphij [Thu, 9 Feb 2006 14:43:42 +0000 (14:43 +0000)]
Actually fix the DHCP handling, by using more robust detection of DHCP
setting. While there, add some more debug messages explaining what is
happening, and some comments to improve readability.
glebius [Thu, 9 Feb 2006 11:42:17 +0000 (11:42 +0000)]
- Increase maximum number of interfaces to 2048.
- Regroup softc so that frequently used elements are
grouped in the beginning, while the interfaces
array is at the end.
yar [Thu, 9 Feb 2006 09:10:54 +0000 (09:10 +0000)]
Avoid calling CPUID function 0x02 if the CPU reports no support for
it. The former code used to hang older Intel CPUs by trying to get
non-existent TLB info 2^32 times.
Reduce code duplication around the calls to CPUID 0x02 by using
do-while loops.
qingli [Wed, 8 Feb 2006 23:32:57 +0000 (23:32 +0000)]
Redo the previous fix by setting the UMA_ZONE_ZINIT bit in the syncache
zone, eliminating the need to call bzero() after each syncache entry
allocation.
Suggested by: glebius
Reviewed by: andre
MFC after: 3 days
sam [Wed, 8 Feb 2006 17:30:31 +0000 (17:30 +0000)]
set the mgt frame tx timer before dispatching the frame to the
driver; this closes a race where a response could be processed
before the timer was started and cause a RUN->SCAN state change
when operating in station mode
glebius [Wed, 8 Feb 2006 11:55:03 +0000 (11:55 +0000)]
The bar.com is an existing domain. Instead of trying to listen on
64.15.205.248 address, change host to "foobar". This won't be
resolvable in most cases, so administrator will need to change it.
Also do not send our trap messages to 64.15.205.248, use localhost
as default traphost.
phk [Wed, 8 Feb 2006 08:09:17 +0000 (08:09 +0000)]
Simplify system time accounting for profiling.
Rename struct thread's td_sticks to td_pticks, we will need the
other name for more appropriately named use shortly. Reduce it
from uint64_t to u_int.
Clear td_pticks whenever we enter the kernel instead of recording
its value as reference for userret(). Use the absolute value of
td->pticks in userret() and eliminate third argument.
cperciva [Wed, 8 Feb 2006 06:52:15 +0000 (06:52 +0000)]
Teach gbde(8) to use a key file in addition to a passphrase. This
makes it practical to use GBDE for "something you have plus something
you know" security together with a USB flash drive.
rwatson [Tue, 7 Feb 2006 23:44:31 +0000 (23:44 +0000)]
Acquire vnode lock around call to VOP_GETATTR() in audit_record_write().
In the future, we may want to acquire the lock early in the function and
hold it across calls to vn_rdwr(), etc, to avoid multiple acquires.
phk [Tue, 7 Feb 2006 21:22:02 +0000 (21:22 +0000)]
Modify the way we account for CPU time spent (step 1)
Keep track of time spent by the cpu in various contexts in units of
"cputicks" and scale to real-world microsec^H^H^H^H^H^H^H^Hclock_t
only when somebody wants to inspect the numbers.
For now "cputicks" are still derived from the current timecounter
and therefore things should by definition remain sensible also on
SMP machines. (The main reason for this first milestone commit is
to verify that hypothesis.)
On slower machines, the avoided multiplications to normalize timestams
at every context switch, comes out as a 5-7% better score on the
unixbench/context1 microbenchmark. On more modern hardware no change
in performance is seen.
qingli [Tue, 7 Feb 2006 20:25:39 +0000 (20:25 +0000)]
The code in rn_walktree_from() that checks if we backed up too far
did not stop at the right node. Change the backtracking check from
smaller-than to smaller-or-equal to prevent this from happening.
While here fix one additional problem where the insertion of the
default route traversed the entire tree.
PR: kern/38752
Submitted by: qingli (before I became committer)
Reviewed by: andre
MFC after: 3 days
qingli [Tue, 7 Feb 2006 19:59:46 +0000 (19:59 +0000)]
Fixes a crash due to the memory of the newly allocated syncache entry
in syncache_lookup() is not cleared and may lead to an arbitrary and
bogus rtentry pointer which later gets free'd.
jhb [Tue, 7 Feb 2006 18:59:47 +0000 (18:59 +0000)]
Provide some anti-footshooting. Don't allow the user to set the interval
for acctwatch() runs to be negative or zero as this could result in either
a possible hang (or panic if INVARIANTS is on). Previously the accounting
code handled the <= 0 case by calling acctwatch on every clock tick (eww!)
due to an implementation detail of callout_reset(). (Tick counts of
<= 0 are converted to 1).
imp [Tue, 7 Feb 2006 18:43:46 +0000 (18:43 +0000)]
Rather than pull in all the phy, just pull in the lxt phy that we need
for this board (although our lxtphy driver isn't claiming it, but that's
a different problem).
imp [Tue, 7 Feb 2006 18:41:56 +0000 (18:41 +0000)]
Allow one to subset phy. If you want the kitchen sink, use device
miibus (like today). If you want a subset, choose device mii and zero
or more phy to include. We always include unkphy. We make use of
the | functionality that ruslan recently added to config.
This allowed me to trim 57k from my KB9202 kernel.
imp [Tue, 7 Feb 2006 18:38:51 +0000 (18:38 +0000)]
Detach the children before we delete them. This is a little cleaner
than just deleting them. Also add comments about why we do this.
Given the current behavior of delete_child, I don't think this changes
anything. It just feels cleaner.
jhb [Tue, 7 Feb 2006 16:04:03 +0000 (16:04 +0000)]
- Add a kthread to periodically call acctwatch() when accounting is active
instead of calling acctwatch() from softclock. The acctwatch() function
needs to hold an sx lock and also makes a VFS call, and neither of these
are good things (or safe) to do from a callout. The kthread only exists
and is running when accounting is turned on; it is started and stopped
as needed. I didn't run acctwatch() via the thread taskqueue at Robert's
request as he was worried that if the accounting file was over NFS the
VFS_STAT() calls might stall other work on the taskqueue.
- Add an acct_disable() function to take care of closing the accounting
vnode and cleaning up so we don't duplicate the same code in two
different places.
oleg [Tue, 7 Feb 2006 11:48:10 +0000 (11:48 +0000)]
Fix five years old bug in ip_reass(): if we are using 'full' (i.e. including
pseudo header) hardware rx checksum offloading ip_reass() fails to calculate
TCP/UDP checksum for reassembled packet correctly. This also should fix
recent 'NFS over UDP over bge' issue exposed by if_bge.c rev. 1.123
marcel [Tue, 7 Feb 2006 03:32:22 +0000 (03:32 +0000)]
o Review and update the support for devices on ia64.
o Add uart(4).
o Remove sab(4) and zs(4) (sparc64 only), as their functionality
has been takien over by uart(4).
rwatson [Mon, 6 Feb 2006 22:50:39 +0000 (22:50 +0000)]
Add support for audit pipe special devices, which allow user space
applications to insert a "tee" in the live audit event stream. Records
are inserted into a per-clone queue so that user processes can pull
discreet records out of the queue. Unlike delivery to disk, audit pipes
are "lossy", dropping records in low memory conditions or when the
process falls behind real-time events. This mechanism is appropriate
for use by live monitoring systems, host-based intrusion detection, etc,
and avoids applications having to dig through active on-disk trails that
are owned by the audit daemon.
rwatson [Mon, 6 Feb 2006 22:30:54 +0000 (22:30 +0000)]
Manage audit record memory with the slab allocator, turning
initialization routines into a ctor, tear-down to a dtor, cleaning
up, etc. This will allow audit records to be allocated from
per-cpu caches.
On recent FreeBSD, dropping the audit_mtx around freeing to UMA is
no longer required (at one point it was possible to acquire Giant
on that path), so a mutex-free thread-local drain is no longer
required.
cognet [Mon, 6 Feb 2006 22:17:42 +0000 (22:17 +0000)]
- Call mii_phy_probe() after we allocated an ifp. mii has this evil
hack where it assumes the first field of the driver softc is the struct
ifnet, and it copies its value in mii_phy_probe().
- In the interrupt handler, set the mbuf m_len field on packet receive.
jhb [Mon, 6 Feb 2006 22:06:54 +0000 (22:06 +0000)]
- Always call exec_free_args() in kern_execve() instead of doing it in all
the callers if the exec either succeeds or fails early.
- Move the code to call exit1() if the exec fails after the vmspace is
gone to the bottom of kern_execve() to cut down on some code duplication.
jhb [Mon, 6 Feb 2006 21:56:13 +0000 (21:56 +0000)]
- Move the wakeup() for exiting kthreads out of exit1() and into
kthread_exit() as that is cleaner and less obscured. It also does the
wakeup sooner.
- Add some comments to kthread_exit().
rwatson [Mon, 6 Feb 2006 18:41:00 +0000 (18:41 +0000)]
Add information on audit pipe special devices, which allow user processes
to "tee" the BSM record stream for the purposes of live monitoring,
intrusion detection, etc. Support for audit pipes will be committed in
the near future.