]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoPull in numerous fixes from myself and cognet. With these fixes the
imp [Thu, 6 Apr 2006 04:30:23 +0000 (04:30 +0000)]
Pull in numerous fixes from myself and cognet.  With these fixes the
KB9202 eval board is finally stable with a nfs root.

18 years agoRemove unused bit definitions.
imp [Thu, 6 Apr 2006 04:29:24 +0000 (04:29 +0000)]
Remove unused bit definitions.
Minor style cleanup while I'm here.

18 years agoOptimize the TX side of the part by using the PDC to move bytes out to
imp [Thu, 6 Apr 2006 04:27:19 +0000 (04:27 +0000)]
Optimize the TX side of the part by using the PDC to move bytes out to
the wire.  This increases the speed considerably.  Start to put
infrastructure in place to do RX side, but that requires more study
before it can be done.

18 years agoRe-correct commit 1.73, but this time in a way that does not cause
gad [Thu, 6 Apr 2006 03:24:31 +0000 (03:24 +0000)]
Re-correct commit 1.73, but this time in a way that does not cause
all column-headers to print in lowercase by default.  I was in too
much of a rush in committing 1.75, and didn't notice that the case
had changed.  This time I did considerably more testing, and used
'diff' instead of just quickly eyeballing the results...

Apologies.  I expect this means the dunce cap is mine for awhile.
If this doesn't work, I'll just drop back to 1.72 and hide under
my desk for awhile.

18 years agoCorrect assertion in ng_detach().
rwatson [Thu, 6 Apr 2006 02:54:42 +0000 (02:54 +0000)]
Correct assertion in ng_detach().

Submitted by: tegge
MFC after: 3 months

18 years agoKeep track of the number of in-progress async direct IO writes in the nfsnode.
mohans [Thu, 6 Apr 2006 01:20:30 +0000 (01:20 +0000)]
Keep track of the number of in-progress async direct IO writes in the nfsnode.
Make fsync/close wait until all of these drain. Add a check to nfs_getpage() and
nfs_putpage().

18 years agoFix typo/pasto: Make NGM_FEC_MODE_* match set_mode_*.
dd [Thu, 6 Apr 2006 00:32:28 +0000 (00:32 +0000)]
Fix typo/pasto: Make NGM_FEC_MODE_* match set_mode_*.

18 years agoFix options broken when the birthtime related primaries were added.
ceri [Wed, 5 Apr 2006 23:06:11 +0000 (23:06 +0000)]
Fix options broken when the birthtime related primaries were added.

Note to self: if a comment says a list must be lexically sorted, sort
the list lexically.

Submitted by: Pawel Worach
Approved by: jhb
MFC after: 2 weeks

18 years agoTypos.
pjd [Wed, 5 Apr 2006 22:07:31 +0000 (22:07 +0000)]
Typos.

18 years agoRevert the backout in the last revision, it was committed to the wrong branch.
brueffer [Wed, 5 Apr 2006 21:51:40 +0000 (21:51 +0000)]
Revert the backout in the last revision, it was committed to the wrong branch.

Pointy hat to:  brueffer

18 years agoBack out the fan control changes that were merged in revision 1.2.2.5.
brueffer [Wed, 5 Apr 2006 21:40:14 +0000 (21:40 +0000)]
Back out the fan control changes that were merged in revision 1.2.2.5.
The necessary changes to the driver haven't been merged yet, which won't
happen before 6.1-RELEASE.

Submitted by: markus
Approved by: re (scottl)

18 years agoCache the value of the lower half of each I/O APIC redirection table entry
jhb [Wed, 5 Apr 2006 20:43:19 +0000 (20:43 +0000)]
Cache the value of the lower half of each I/O APIC redirection table entry
so that we only have to do an ioapic_write() instead of an ioapic_read()
followed by an ioapic_write() every time we mask and unmask level triggered
interrupts.  This cuts the execution time for these operations roughly in
half.

Profiled by: Paolo Pisati <p.pisati@oltrelinux.com>
MFC after: 1 week

18 years agoAdd an unreachable return statement, in order to avoid a compiler warning
jasone [Wed, 5 Apr 2006 18:46:24 +0000 (18:46 +0000)]
Add an unreachable return statement, in order to avoid a compiler warning
for non-standard optimization levels.

Reported by: Michael Zach <zach@webges.com>

18 years agoFix a problem introduced by change 1.73, which causes a seg-fault if
gad [Wed, 5 Apr 2006 17:40:46 +0000 (17:40 +0000)]
Fix a problem introduced by change 1.73, which causes a seg-fault if
the user specifies a keyword which is an alias to some other keyword.
E.g.: stat (for state) or pcpu (for %cpu)..

Submitted by: Kostik Belousov
MFC plans: "soon"

18 years agoWhen printing a map, print the number of samples recorded by each gmon.out file.
jkoshy [Wed, 5 Apr 2006 15:12:25 +0000 (15:12 +0000)]
When printing a map, print the number of samples recorded by each gmon.out file.

MFC after: 1 week

18 years agoAdd a new feature to ping(8) - possibility to specify maximum
glebius [Wed, 5 Apr 2006 12:30:42 +0000 (12:30 +0000)]
Add a new feature to ping(8) - possibility to specify maximum
wait time for a packet. This allows to:

 - Count number of packets received before and after specified
   time.
 - Shorten time of execution of 'ping -c 1' scripts.

Submitted by: Lytochkin Boris <lytboris gmail.com>

18 years agoDon't unlock a timewait structure if the pointer is NULL in
rwatson [Wed, 5 Apr 2006 08:45:59 +0000 (08:45 +0000)]
Don't unlock a timewait structure if the pointer is NULL in
tcp_timewait().  This corrects a bug (or lack of fixing of a bug)
in tcp_input.c:1.295.

Submitted by: Kazuaki Oda <kaakun at highway dot ne dot jp>
MFC after: 3 months

18 years agoOnly initialize the first per-chunk page map element for free runs. This
jasone [Wed, 5 Apr 2006 04:15:12 +0000 (04:15 +0000)]
Only initialize the first per-chunk page map element for free runs.  This
makes run split/coalesce operations of complexity lg(n) rather than n.

18 years agoCertain (bad) values of sack blocks can end up corrupting the sack scoreboard.
mohans [Wed, 5 Apr 2006 00:11:04 +0000 (00:11 +0000)]
Certain (bad) values of sack blocks can end up corrupting the sack scoreboard.
Make the checks in tcp_sack_doack() more robust to prevent this.

Submitted by: Raja Mukerji (raja@mukerji.com)
Reviewed by:  Mohan Srinivasan

18 years agonewbus will zero softc, so no need to duplicate the zeroing here.
imp [Tue, 4 Apr 2006 23:29:17 +0000 (23:29 +0000)]
newbus will zero softc, so no need to duplicate the zeroing here.
Plus a minor formatting nit in nearby code.

18 years agoadd links for the functions documented in bus_space.9...
jmg [Tue, 4 Apr 2006 22:56:08 +0000 (22:56 +0000)]
add links for the functions documented in bus_space.9...

18 years agoAdd my birthday.
alepulver [Tue, 4 Apr 2006 22:32:14 +0000 (22:32 +0000)]
Add my birthday.

Approved by: garga (mentor)

18 years agoDon't call bfe_release_resources() twice.
pjd [Tue, 4 Apr 2006 22:30:12 +0000 (22:30 +0000)]
Don't call bfe_release_resources() twice.

Found by: Coverity Prevent analysis tool
CID: 600
MFC after: 1 week

18 years agoFor USIII CPUs the type of the trap caused by peeking/poking non-existent
marius [Tue, 4 Apr 2006 21:00:44 +0000 (21:00 +0000)]
For USIII CPUs the type of the trap caused by peeking/poking non-existent
PCI devices apparently was changed from a special deferred trap with TPC
pointing to the membar #Sync following the failing load/store instruction
to a precise trap with TPC pointing to the failing load/store instruction.
Thus remove the check the check whether TPC points to a membar #Sync in
case of a data access trap as it's off-by-one for USIII CPUs and it should
be sufficient to check whether the trap happend while in fasword*() to
properly detect traps caused by peeking/poking. This also corresponds to
what other OSs do. Note that also only the USIIi manual suggests to check
the TPC for such traps while the USII one doesn't (in the public USIII
manual device peeking/poking isn't mentioned at all).

18 years agoAdd malloc_usable_size() to the RETURN VALUES section.
jasone [Tue, 4 Apr 2006 20:27:53 +0000 (20:27 +0000)]
Add malloc_usable_size() to the RETURN VALUES section.

18 years agoUndo damage from wrong MFC to HEAD.
andre [Tue, 4 Apr 2006 20:20:51 +0000 (20:20 +0000)]
Undo damage from wrong MFC to HEAD.

Pointed out by: jkim, remko

18 years agoConvert pv_entry_frees and pv_entry_allocs stats counters from int to long,
peter [Tue, 4 Apr 2006 20:17:35 +0000 (20:17 +0000)]
Convert pv_entry_frees and pv_entry_allocs stats counters from int to long,
they wrap way too quickly.

18 years agoMFC rev. 1.32: Add link status descriptions and related structures for userland
andre [Tue, 4 Apr 2006 20:02:51 +0000 (20:02 +0000)]
MFC rev. 1.32: Add link status descriptions and related structures for userland
applications.

Approved by: re

18 years agoAdd init_lock, and use it to protect against allocator initialization
jasone [Tue, 4 Apr 2006 19:46:28 +0000 (19:46 +0000)]
Add init_lock, and use it to protect against allocator initialization
races.  This isn't currently necessary for libpthread or libthr, but
without it external threads libraries like the linuxthreads port are
not safe to use.

Reported by: ganbold@micom.mng.net

18 years agoTurn a file that was mostly style(9) compliant to a file that's really close
imp [Tue, 4 Apr 2006 19:30:47 +0000 (19:30 +0000)]
Turn a file that was mostly style(9) compliant to a file that's really close
to being completely style(9).  The odd-ball indentation in a few places was
really distracting.

18 years agoThe Z8530 on the MacIO has an interrupt per channel. Deal with this
marcel [Tue, 4 Apr 2006 17:33:08 +0000 (17:33 +0000)]
The Z8530 on the MacIO has an interrupt per channel. Deal with this
by having interrupt resource variables per channel. We don't set up
different interrupt handlers per channel, though.

18 years agoMFen 1.907 -> 1.910
delphij [Tue, 4 Apr 2006 17:17:33 +0000 (17:17 +0000)]
MFen 1.907 -> 1.910

Obtained from: FreeBSD Simplified Chinese Project

18 years agoReplace hard coded '0' with symbolic constant IIC_UNKNOWN to reflect what
imp [Tue, 4 Apr 2006 17:08:40 +0000 (17:08 +0000)]
Replace hard coded '0' with symbolic constant IIC_UNKNOWN to reflect what
we're actually doing.

18 years agoAdd a tunable net.inet.tcp.maxtcptw, that allows to set a limit
glebius [Tue, 4 Apr 2006 14:31:37 +0000 (14:31 +0000)]
Add a tunable net.inet.tcp.maxtcptw, that allows to set a limit
on tcptw zone independently from setting a limit on socket zone.

18 years ago- Add my birthday
jmelo [Tue, 4 Apr 2006 13:06:21 +0000 (13:06 +0000)]
- Add my birthday

Approved by: mnag (mentor)

18 years agoBefore dereferencing intotw() when INP_TIMEWAIT, check for inp_ppcb being
rwatson [Tue, 4 Apr 2006 12:26:07 +0000 (12:26 +0000)]
Before dereferencing intotw() when INP_TIMEWAIT, check for inp_ppcb being
NULL.  We currently do allow this to happen, but may want to remove that
possibility in the future.  This case can occur when a socket is left
open after TCP wraps up, and the timewait state is recycled.  This will
be cleaned up in the future.

Found by: Kazuaki Oda <kaakun at highway dot ne dot jp>
MFC after: 3 months

18 years ago- Sync rc.subr with NetBSD.
flz [Tue, 4 Apr 2006 10:52:15 +0000 (10:52 +0000)]
- Sync rc.subr with NetBSD.
- Merge some documentation bits.

Reviewed by: brooks, simon (doc)
Approved by: cperciva (mentor)
Obtained from: NetBSD
MFC after: 3 days

18 years agoNote that all of the birthtime related primaries are non-standard.
ceri [Tue, 4 Apr 2006 10:20:16 +0000 (10:20 +0000)]
Note that all of the birthtime related primaries are non-standard.

18 years agoRemove unused variables s and error in key_detach. The previous
dd [Tue, 4 Apr 2006 10:11:15 +0000 (10:11 +0000)]
Remove unused variables s and error in key_detach. The previous
revision removed their usage but did not remove the declaration. This
caused a warning in my build, which was fatal with -Werror.

18 years ago - VFS_LOCK_GIANT when recycling a vnode via getnewvnode. We may be
jeff [Tue, 4 Apr 2006 06:46:10 +0000 (06:46 +0000)]
 - VFS_LOCK_GIANT when recycling a vnode via getnewvnode.  We may be
   recycling for an unrelated filesystem.  I really don't like potentially
   acquiring giant in the context of a giantless filesystem but there
   are reasonable objections to removing the recycling from this path.

Sponsored by: Isilon Systems, Inc.

18 years ago - Properly check against B_DELWRI and B_NEEDSGIANT. This check was
jeff [Tue, 4 Apr 2006 06:44:21 +0000 (06:44 +0000)]
 - Properly check against B_DELWRI and B_NEEDSGIANT.  This check was
   incorrectly written and caused some !NEEDSGIANT buffers to be put in
   the NEEDSGIANT queue.

Sponsored by: Isilon Systems, Inc.

18 years agoThe MFI driver appears first in FreeBSD 6.1
scottl [Tue, 4 Apr 2006 04:11:55 +0000 (04:11 +0000)]
The MFI driver appears first in FreeBSD 6.1

18 years agoRefactor per-run bitmap manipulation functions so that bitmap offsets only
jasone [Tue, 4 Apr 2006 03:51:47 +0000 (03:51 +0000)]
Refactor per-run bitmap manipulation functions so that bitmap offsets only
have to be calculated once per allocator operation.

Make nil const.

Update various comments.

Remove/avoid division where possible.

For the one division operation that remains in the critical path, add a
switch statement that has a case for each small size class, and do division
with a constant divisor in each case.  This allows the compiler to generate
optimized code that does not use hardware division [1].

Obtained from: peter [1]

18 years agoRemove declaration of _thr_initial from MD header file, it is no longer
davidxu [Tue, 4 Apr 2006 03:35:26 +0000 (03:35 +0000)]
Remove declaration of _thr_initial from MD header file, it is no longer
needed.

18 years agoSimplify _get_curthread() and _tcb_ctor because libc and rtld now
davidxu [Tue, 4 Apr 2006 03:26:06 +0000 (03:26 +0000)]
Simplify _get_curthread() and _tcb_ctor because libc and rtld now
already allocate thread pointer space in tls block for initial thread.
Only i386 and amd64 have been done, others still have to be tested.

18 years agoRemove unintended DEBUG flag setting.
gnn [Tue, 4 Apr 2006 03:12:21 +0000 (03:12 +0000)]
Remove unintended DEBUG flag setting.

18 years agoSync with i386: Map exceptions to signals in gdb_cpu_signal() so
marcel [Tue, 4 Apr 2006 03:00:20 +0000 (03:00 +0000)]
Sync with i386: Map exceptions to signals in gdb_cpu_signal() so
that kgdb(1) gets a SIGTRAP when it needs to.

Pointed out by: grehan@

18 years agoWARNS level 4 cleanup.
davidxu [Tue, 4 Apr 2006 02:57:49 +0000 (02:57 +0000)]
WARNS level 4 cleanup.

18 years agoWARNS level 4 cleanup, still has work to do.
davidxu [Tue, 4 Apr 2006 02:57:09 +0000 (02:57 +0000)]
WARNS level 4 cleanup, still has work to do.

18 years agoThe PC is register 16, not 18.
marcel [Tue, 4 Apr 2006 02:44:51 +0000 (02:44 +0000)]
The PC is register 16, not 18.

Pointed out by: grehan@

18 years agoAdd support for Intel cpu model's 5 & 6.
ps [Tue, 4 Apr 2006 02:36:04 +0000 (02:36 +0000)]
Add support for Intel cpu model's 5 & 6.

Approved by: jkoshy

18 years agoFreshen a comment.
jkoshy [Tue, 4 Apr 2006 02:26:45 +0000 (02:26 +0000)]
Freshen a comment.

Reviewed by: jhb

18 years agoFix an off-by-one error in the port range detection. Cleanup some old
njl [Tue, 4 Apr 2006 02:22:38 +0000 (02:22 +0000)]
Fix an off-by-one error in the port range detection.  Cleanup some old
whitespace.

18 years agoIn z8530_divisor() return 0 if the calculated divisor is less than 0.
marcel [Tue, 4 Apr 2006 01:16:16 +0000 (01:16 +0000)]
In z8530_divisor() return 0 if the calculated divisor is less than 0.
This happens when the baudrate is too high for the given RCLK.

18 years agoIncrement kdb_active after we stopped the other CPUs and decrement
marcel [Tue, 4 Apr 2006 00:40:20 +0000 (00:40 +0000)]
Increment kdb_active after we stopped the other CPUs and decrement
kdb_active before we restart them. This avoids false positives on
restarted CPUs when they test for kdb_active while kdb_trap() is
still finishing up.

18 years agoImprove handling of IPI_STOP:
marcel [Mon, 3 Apr 2006 23:56:40 +0000 (23:56 +0000)]
Improve handling of IPI_STOP:
o  use atomic operations to fiddle with stopped_cpus and started_cpus.
o  disable interrupts while we're waiting to be started.
o  remove logic relating to cpustop_restartfunc as it's not used.

18 years agoEliminate HAVE_STOPPEDPCBS. On ia64 the PCPU holds a pointer to the
marcel [Mon, 3 Apr 2006 22:51:47 +0000 (22:51 +0000)]
Eliminate HAVE_STOPPEDPCBS. On ia64 the PCPU holds a pointer to the
PCB in which the context of stopped CPUs is stored. To access this
PCB from KDB, we introduce a new define, called KDB_STOPPEDPCB. The
definition, when present, lives in <machine/kdb.h> and abstracts
where MD code saves the context. Define KDB_STOPPEDPCB on i386,
amd64, alpha and sparc64 in accordance to previous code.

18 years agoEliminate softdep_flush() livelock by accounting for number of worklist items
tegge [Mon, 3 Apr 2006 22:23:23 +0000 (22:23 +0000)]
Eliminate softdep_flush() livelock by accounting for number of worklist items
marked as being in progress.

18 years agoShrink the amd64 pv entry from 48 bytes to about 24 bytes. On a machine
peter [Mon, 3 Apr 2006 21:36:01 +0000 (21:36 +0000)]
Shrink the amd64 pv entry from 48 bytes to about 24 bytes.  On a machine
with large mmap files mapped into many processes, this saves hundreds of
megabytes of ram.
pv entries were individually allocated and had two tailq entries and two
pointers (or addresses).  Each pv entry was linked to a vm_page_t and
a process's address space (pmap).  It had the virtual address and a
pointer to the pmap.
This change replaces the individual allocation with a per-process
allocation system.  A page ("pv chunk") is allocated and this provides
168 pv entries for that process.  We can now eliminate one of the 16 byte
tailq entries because we can simply iterate through the pv chunks to find
all the pv entries for a process.  We can eliminate one of the 8 byte
pointers because the location of the pv entry implies the containing
pv chunk, which has the pointer.  After overheads from the pv chunk
bitmap and tailq linkage, this works out that each pv entry has an
effective size of 24.38 bytes.

Future work still required, and other problems:
* when running low on pv entries or system ram, we may need to defrag
  the chunk pages and free any spares.  The stats (vm.pmap.*) show that
  this doesn't seem to be that much of a problem, but it can be done if
  needed.
* running low on pv entries is now a much bigger problem.  The old
  get_pv_entry() routine just needed to reclaim one other pv entry.
  Now, since they are per-process, we can only use pv entries that are
  assigned to our current process, or by stealing an entire page worth
  from another process.  Under normal circumstances, the pmap_collect()
  code should be able to dislodge some pv entries from the current
  process.  But if needed, it can still reclaim entire pv chunk pages
  from other processes.
* This should port to i386 really easily, except there it would reduce
  pv entries from 24 bytes to about 12 bytes.

(I have integrated Alan's recent changes.)

18 years ago- s,tramoline,trampoline, in a comment.
marius [Mon, 3 Apr 2006 21:27:01 +0000 (21:27 +0000)]
- s,tramoline,trampoline, in a comment.
- Use FBSDID in trap.c
- Make the global trap_sig[] static as it's not used outside of trap.c.
- In sendsig() remove an unused variable.
- In trap() sync with the other archs; for fast data access MMU miss and
  data access protection traps set ksi_addr to the SFAR reg which contains
  the faulting address and otherwise to the TPC reg. Generally the TCP reg
  contains the address of the instruction that caused the exception, except
  for fast instruction access traps (and some others; more refinement may
  be needed here) it also contains the faulting address.
  Previously sendsig() always set si_addr to the SFAR reg which is wrong
  for most traps.
- In sendsig() add support for FreeBSD old-style signals.

These changes are inspired by kmacy's sun4v changes and allow libsigsegv
to build on FreeBSD/sparc64, but it doesn't pass all checks and tests it
actually should, yet.

MFC after: 5 days

18 years agoUpdate pmap_remove_pages(9) doc.
peter [Mon, 3 Apr 2006 21:17:36 +0000 (21:17 +0000)]
Update pmap_remove_pages(9) doc.

18 years agoRemove the unused sva and eva arguments from pmap_remove_pages().
peter [Mon, 3 Apr 2006 21:16:10 +0000 (21:16 +0000)]
Remove the unused sva and eva arguments from pmap_remove_pages().

18 years agoIn kdb_trap(), change the type of the local variable 'intr' from int
marcel [Mon, 3 Apr 2006 20:55:52 +0000 (20:55 +0000)]
In kdb_trap(), change the type of the local variable 'intr' from int
to register_t, as intr_disable() returns the latter and register_t
may be wider than int.

Pointed out by: marius@

18 years agoBump .Dd for the birthtime options.
ceri [Mon, 3 Apr 2006 20:53:34 +0000 (20:53 +0000)]
Bump .Dd for the birthtime options.

18 years agoAdd -Btime, -Bnewer, -Bmin, -newerB[Bacmt], -newer[acmt]B options to
ceri [Mon, 3 Apr 2006 20:36:37 +0000 (20:36 +0000)]
Add -Btime, -Bnewer, -Bmin, -newerB[Bacmt], -newer[acmt]B options to
work with the st_birthtime field of struct stat.

'B' has been chosen to match the format specifier from stat(1).

Approved by: jhb
MFC after: 2 weeks

18 years agoMilosz (sorry for not using the right 'l', it will not display corretly
netchild [Mon, 3 Apr 2006 18:42:44 +0000 (18:42 +0000)]
Milosz (sorry for not using the right 'l', it will not display corretly
in the commit log) submitted support for some NO_* knobs for delete-old*
and check-old. I converted it to the new WITHOUT_* knobs (more correctly:
MK_*) and added some dummy ones so that people can see what's missing.

Volunteers can have a look at http://phk.freebsd.dk/misc/build_options/
for a list of files.

The location looks a little bit odd to me, but I don't care about the
color of this bikeshed and follow the suggestion of our build
infrastructure guru to place it "somewhere under src/tools/ please". [1]
The build/mk/ directory looks more sane to me than the other ones there.

Submitted by: milosz.galazka@gmail.com
Suggested by: ru [1]

18 years agoo add opt_ath.h enable tweaking various config parameters for the driver
sam [Mon, 3 Apr 2006 18:14:02 +0000 (18:14 +0000)]
o add opt_ath.h enable tweaking various config parameters for the driver
  without modifying the source code
o default debug msgs and diag support to off

MFC after: 3 days

18 years agoReplace critical_enter() and critical_exit() in kdb_trap() with
marcel [Mon, 3 Apr 2006 17:48:09 +0000 (17:48 +0000)]
Replace critical_enter() and critical_exit() in kdb_trap() with
intr_disable() and intr_restore() resp. Previously, critical
regions would have interrupts disabled, but that was changed.
Consequently, the debugger could run with interrupts enabled.
This could cause problems for the low-level console code where
received characters would trigger an interrupt that causes
the interrupt handler to read the character instead of the
cngetc() function.

18 years agoAdd device ID for nForce 410 MCP audio controller.
ariff [Mon, 3 Apr 2006 17:37:27 +0000 (17:37 +0000)]
Add device ID for nForce 410 MCP audio controller.

PR: kern/95257
Submitted by: cenix <cenixxx at gmail dot com>
MFC after: 3 days

18 years agoIn TCP notify routines, check inpcb for INP_TIMEWAIT and INP_DROPPED.
rwatson [Mon, 3 Apr 2006 14:07:50 +0000 (14:07 +0000)]
In TCP notify routines, check inpcb for INP_TIMEWAIT and INP_DROPPED.
The INP_DROPPED check replaces the current NULL checks; the INP_TIMEWAIT
checks appear to have always been required, but not been there, which
is/was a bug.  This avoids unconditionally casting of in_ppcb to a tcpcb,
when it may be a twtcb, which may have resulted in obscure ICMP-related
panics in earlier releases.

MFC after: 3 months

18 years agoChange inp_ppcb from caddr_t to void *, fix/remove associated related
rwatson [Mon, 3 Apr 2006 13:33:55 +0000 (13:33 +0000)]
Change inp_ppcb from caddr_t to void *, fix/remove associated related
casts.

Consistently use intotw() to cast inp_ppcb pointers to struct tcptw *
pointers.

Consistently use intotcpcb() to cast inp_ppcb pointers to struct tcpcb *
pointers.

Don't assign tp to the results to intotcpcb() during variable declation
at the top of functions, as that is before the asserts relating to
locking have been performed.  Do this later in the function after
appropriate assertions have run to allow that operation to be conisdered
safe.

MFC after: 3 months

18 years agoStyle tweaks: convert to ANSI from K&R function prototypes.
rwatson [Mon, 3 Apr 2006 12:59:27 +0000 (12:59 +0000)]
Style tweaks: convert to ANSI from K&R function prototypes.

MFC after: 3 months

18 years agoUpdate comment on tcp_close() for new world order.
rwatson [Mon, 3 Apr 2006 12:52:13 +0000 (12:52 +0000)]
Update comment on tcp_close() for new world order.

MFC after: 3 months

18 years agoClarify comment on handling of non-timewait TCP states in
rwatson [Mon, 3 Apr 2006 12:43:56 +0000 (12:43 +0000)]
Clarify comment on handling of non-timewait TCP states in
tcp_usr_detach().

MFC after: 3 months

18 years agoAdd a second pass to the close-before-accept test using a call to the
rwatson [Mon, 3 Apr 2006 11:57:41 +0000 (11:57 +0000)]
Add a second pass to the close-before-accept test using a call to the
tcp drop sysctl.  This should exercise the ECONNABORTED accept case.

18 years agoFix up locking surrounding tcp_drop sysctl: in the new world order, we
rwatson [Mon, 3 Apr 2006 11:57:12 +0000 (11:57 +0000)]
Fix up locking surrounding tcp_drop sysctl: in the new world order, we
don't free inpcbs until after the socket is closed, so we always need
to unlock an inpcb after calling tcp_drop() on it.

MFC after: 3 months

18 years agoAdd regression test for tcpdrop sysctl.
rwatson [Mon, 3 Apr 2006 11:34:36 +0000 (11:34 +0000)]
Add regression test for tcpdrop sysctl.

18 years agoAdd a regression test to exercise the case where accept() is called and
rwatson [Mon, 3 Apr 2006 10:08:35 +0000 (10:08 +0000)]
Add a regression test to exercise the case where accept() is called and
the next waiting socket has had a close on the remote endpoint already.

18 years agoAfter checking for SO_ISDISCONNECTED in tcp_usr_accept(), return
rwatson [Mon, 3 Apr 2006 09:52:55 +0000 (09:52 +0000)]
After checking for SO_ISDISCONNECTED in tcp_usr_accept(), return
immediately rather than jumping to the normal output handling, which
assumes we've pulled out the inpcb, which hasn't happened at this
point (and isn't necessary).

Return ECONNABORTED instead of EINVAL when the inpcb has entered
INP_TIMEWAIT or INP_DROPPED, as this is the documented error value.

This may correct the panic seen by Ganbold.

MFC after: 1 month
Reported by: Ganbold <ganbold at micom dot mng dot net>

18 years agoCorrect incorrect assertion in div_bind(): inp must not be NULL here.
rwatson [Mon, 3 Apr 2006 09:01:17 +0000 (09:01 +0000)]
Correct incorrect assertion in div_bind(): inp must not be NULL here.

Reported by: tegge
MFC after: 3 months

18 years agoRemove unused variable 'error'. Forgotten in previous commit.
marcel [Sun, 2 Apr 2006 21:58:09 +0000 (21:58 +0000)]
Remove unused variable 'error'. Forgotten in previous commit.

18 years agoDon't claim a SAB82532. We have scc(4) for that.
marcel [Sun, 2 Apr 2006 21:50:45 +0000 (21:50 +0000)]
Don't claim a SAB82532. We have scc(4) for that.

18 years agoEliminate the sc_hasfifo flag from the softc. It was only used by
marcel [Sun, 2 Apr 2006 21:45:54 +0000 (21:45 +0000)]
Eliminate the sc_hasfifo flag from the softc. It was only used by
the NS8250 class driver. The UART has FIFOs if sc_rxfifosz>1, so
test for that instead.
While here properly initialize sc_rxfifosz and sc_txfifosz in the
case the UART doesn't have FIFOs.

18 years agoAdd scc(4).
marcel [Sun, 2 Apr 2006 21:00:17 +0000 (21:00 +0000)]
Add scc(4).

18 years agoRemove uart(4) as it's supported on all architectures and that is the
marcel [Sun, 2 Apr 2006 20:59:40 +0000 (20:59 +0000)]
Remove uart(4) as it's supported on all architectures and that is the
default.

18 years agoAdd test cases that check utility syntax errors and redirection errors. For
stefanf [Sun, 2 Apr 2006 19:02:49 +0000 (19:02 +0000)]
Add test cases that check utility syntax errors and redirection errors.  For
special built-in utilities they must terminate the shell, for other
utilities only a error message shall be written.  We currently fail both
tests.

18 years agoIssue an error when . (dot) is invoked without a filename. The synopsis
stefanf [Sun, 2 Apr 2006 18:51:32 +0000 (18:51 +0000)]
Issue an error when . (dot) is invoked without a filename.  The synopsis
is just ". file" according to POSIX, however many other shells allow
arguments to be passed after the file.  For compatibility (we even use that
feature in buildworld) additional arguments are not considered to be an
error, even though this shell does not do anything with the arguments at all.

18 years agoUse -s to flag POSIX's "special built-in" utilities in builtins.def. Add a
stefanf [Sun, 2 Apr 2006 18:43:33 +0000 (18:43 +0000)]
Use -s to flag POSIX's "special built-in" utilities in builtins.def.  Add a
new member to struct builtincmd and set it to 1 if -s was specified.  This
is done because there are cases where special builtins must be treated
differently from other builtins.

Obtained from: NetBSD (builtins.def part)

18 years agoFix a typo: s/&man.rfcomm.pppd.8;/&man.rfcomm.sppd.1;/.
hrs [Sun, 2 Apr 2006 18:26:48 +0000 (18:26 +0000)]
Fix a typo: s/&man.rfcomm.pppd.8;/&man.rfcomm.sppd.1;/.

18 years agoDuring reformulation of tcp_usr_detach(), the call to initiate TCP
rwatson [Sun, 2 Apr 2006 16:42:51 +0000 (16:42 +0000)]
During reformulation of tcp_usr_detach(), the call to initiate TCP
disconnect for fully connected sockets was dropped, meaning that if
the socket was closed while the connection was alive, it would be
leaked.  Structure tcp_usr_detach() so that there are two clear
parts: initiating disconnect, and reclaiming state, and reintroduce
the tcp_disconnect() call in the first part.

MFC after: 3 months

18 years agoNew release notes:
hrs [Sun, 2 Apr 2006 14:53:28 +0000 (14:53 +0000)]
New release notes:
hwpmc(4) and pmcstat(8) profiling support for dynamically-loaded
objects, and pmcstat(8) network logging support added[1].

Fix incorrect entries:
gmirror/graid3 uses parallel I/O request for synchronization now.
The parallel I/O request itself has been already supported[2].

Spotted by: jkoshy[1] and pjd[2]

18 years agoFix typos and the following incorrect entries:
hrs [Sun, 2 Apr 2006 14:25:12 +0000 (14:25 +0000)]
Fix typos and the following incorrect entries:
kbdmux(4) GENERIC support currently in amd64 and i386 only[1],
uart(4) GENERIC support currently not in pc98[1],
speaker(4) on amd64 entry needs arch="amd64"[2],
hptmv(4) update entry needs arch="amd64,i386"[2], and
OpenSSH 4.3p1 import has not been merged yet[2].

Spotted by: nyan[1] and delphij[2]

18 years agoMFen 1.903 -> 1.907
delphij [Sun, 2 Apr 2006 14:14:37 +0000 (14:14 +0000)]
MFen 1.903 -> 1.907

Obtained from: FreeBSD Simplified Chinese Project

18 years ago- Teach pmcstat(8) to log over the network; the -O option now
jkoshy [Sun, 2 Apr 2006 12:52:16 +0000 (12:52 +0000)]
- Teach pmcstat(8) to log over the network; the -O option now
  takes a host:port specification.
- Update the manual page and add an example showing how log
  over the network using pmcstat(8) and nc(1).  Document the
  current inability to process logs in cross-platform manner.
- Have pmcstat_open_log() call err(3) directly in case
  of an error; this simplifies error handling in its caller.

MFC after: 1 week

18 years agoWhen running the second part of the test, kill off the server process from
rwatson [Sun, 2 Apr 2006 11:09:37 +0000 (11:09 +0000)]
When running the second part of the test, kill off the server process from
the first part before starting, or the TCP port we want to bind may be in
use still.  Sleep for a short period between tests.

Use SIGTERM instead of SIGKILL.

18 years agoPass the right pid into the parent and child tasks so that when a test
rwatson [Sun, 2 Apr 2006 11:03:05 +0000 (11:03 +0000)]
Pass the right pid into the parent and child tasks so that when a test
fails, we kill the right partner process.

18 years agoAdd makefile for tcpsocktimewait missed in previous commit.
rwatson [Sun, 2 Apr 2006 10:50:46 +0000 (10:50 +0000)]
Add makefile for tcpsocktimewait missed in previous commit.

18 years agoUpdate release notes (round 2, until Mar 2006):
hrs [Sun, 2 Apr 2006 07:56:48 +0000 (07:56 +0000)]
Update release notes (round 2, until Mar 2006):

file descriptor handling bug fixed,
support for copying console messages to remote gdb(1),
kbdmux(4) now in GENERIC by default,
scc(4) for generic serial devices added,
net.inet.ip.portrange.reserved[high|low] for IPv6,
ata(4) USB mass storage class support,
gmirror kernel crash dump support,
gmirror and graid3 parallel I/O request support,
mfi(4) for LSI MegaRAID SAS controller family added,
getfacl(1) -q option added,
gvinum(8) resetconfig sub-command support,
libarchive(3) tp format support removed,
libarchive(3) POSIX.1e EA support added,
libc symbol map added,
libm symbol map added,
ls(1) -U option added,
mdconfig(8) XML device listing support,
mdconfig(8) -u option now supports comma-separated multiple devices,
BIND9 DNS resolver library imported,
strtonum(3) from OpenBSD,
rc.d/ike removed,
GNU Readline library updated to 5.1,
OpenSSH updated to 4.3p1,
hostapd updated to 0.4.8,
WPA supplicant updated to 0.4.8,
zlib updated to 1.2.3,
pkg_add(1) -F option added,
portsnap(1) HTTP_PROXY_AUTH handling bug fixed,
"make showconfig" in src/Makefile added, and
/etc/src.conf added.

18 years agoIf you see a broken symlink, don't try to follow it,
kientzle [Sun, 2 Apr 2006 07:13:11 +0000 (07:13 +0000)]
If you see a broken symlink, don't try to follow it,
just archive it as a symlink, even if -h was specified.

Thanks to: Jin Guojun
PR: bin/95175
MFC After: 1 week

18 years agoIntroduce pmap_try_insert_pv_entry(), a function that conditionally creates
alc [Sun, 2 Apr 2006 05:45:05 +0000 (05:45 +0000)]
Introduce pmap_try_insert_pv_entry(), a function that conditionally creates
a pv entry if the number of entries is below the high water mark for pv
entries.

Use pmap_try_insert_pv_entry() in pmap_copy() instead of
pmap_insert_entry().  This avoids possible recursion on a pmap lock in
get_pv_entry().

Eliminate the explicit low-memory checks in pmap_copy().  The check that
the number of pv entries was below the high water mark was largely
ineffective because it was located in the outer loop rather than the
inner loop where pv entries were allocated.  Instead of checking, we
attempt the allocation and handle the failure.

Reviewed by: tegge
Reported by: kris
MFC after: 5 days