]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoAdd symbol versioning.
deischen [Wed, 29 Mar 2006 14:08:45 +0000 (14:08 +0000)]
Add symbol versioning.

Reviewed by: davidxu

18 years ago*thwack*! all the world's not i386.
des [Wed, 29 Mar 2006 12:29:01 +0000 (12:29 +0000)]
*thwack*!  all the world's not i386.

Pointy hat to: des

18 years agoTeach sysinstall about mfi(4).
scottl [Wed, 29 Mar 2006 10:02:26 +0000 (10:02 +0000)]
Teach sysinstall about mfi(4).

18 years agoHook the MFI driver up to the build.
scottl [Wed, 29 Mar 2006 09:57:22 +0000 (09:57 +0000)]
Hook the MFI driver up to the build.

18 years agoSpaces to tab
gshapiro [Wed, 29 Mar 2006 07:50:58 +0000 (07:50 +0000)]
Spaces to tab

18 years agoAdd sendmail 8.13.4 -> 8.13.6 release note entry.
gshapiro [Wed, 29 Mar 2006 07:48:45 +0000 (07:48 +0000)]
Add sendmail 8.13.4 -> 8.13.6 release note entry.

18 years agoAdd a manual page for mfi(4).
scottl [Wed, 29 Mar 2006 07:35:39 +0000 (07:35 +0000)]
Add a manual page for mfi(4).

18 years agoAdd a blacklist for bad IO ports that AML should never touch. It seems
njl [Wed, 29 Mar 2006 06:41:56 +0000 (06:41 +0000)]
Add a blacklist for bad IO ports that AML should never touch.  It seems
some systems were designed so that AML writes to various resources shared
with OS drivers, including the RTC, PIC, PCI, etc.  These writes could
collide with writes by the OS and should never be performed.  For now, we
print a message if such an access occurs, but do not block it.  To block
the access, the tunable "debug.acpi.block_bad_io" can be set to 1.  In the
future, we will flip the switch and this will become the default.

Information about this problem was found in Microsoft KB 283649.  They
block IO accesses if the BIOS indicates via _OSI that it is Windows 2001
or higher.  They always block accesses to the PIC, cascaded PIC, and ELCRs,
no matter how old the BIOS.

18 years agoAdd reset register support. This is the only method to reboot some new
njl [Wed, 29 Mar 2006 06:30:47 +0000 (06:30 +0000)]
Add reset register support.  This is the only method to reboot some new
systems (blade servers).  On most systems, this is implemented as an IO
write to the SMI port and the BIOS generates the actual reset.

PR: kern/94939
Submitted by: dodell@ixsystems.com
Reviewed by: jhb
MFC after: 3 weeks

18 years agoBring libpthread up to WARNS level 2.
des [Wed, 29 Mar 2006 05:38:19 +0000 (05:38 +0000)]
Bring libpthread up to WARNS level 2.

Reviewed by: deischen

18 years agoAccount for recent changes in namespace.h. Use _pthread_create
deischen [Wed, 29 Mar 2006 04:20:53 +0000 (04:20 +0000)]
Account for recent changes in namespace.h.  Use _pthread_create
instead of pthread_create.

18 years ago- We only lock the local per-CPU page in the local dTLB, so accessing the
marius [Wed, 29 Mar 2006 00:14:08 +0000 (00:14 +0000)]
- We only lock the local per-CPU page in the local dTLB, so accessing the
  foreign per-CPU pages in cpu_ipi_send() in order to get the module IDs
  of the other CPUs can cause a page fault. If this happens when doing a
  TLB shootdown while dealing with another page fault this causes a panic
  due to the recursive page fault. As I don't spot other code that assumes
  or requires that accessing foreign per-CPU pages must not page fault
  solve this by adding a statically allocated (and therefore locked in the
  kernel pages) array which establishes a FreeBSD CPU ID -> module ID
  relation and use that in cpu_ipi_selected() (instead of statically
  allocating the per-CPU pages which would just waste memory on say a dual
  CPU machine as sun4u theoretically supports up to 128 CPUs or wasting
  dTLB slots for the foreign per-CPU pages). [1]
- Fix a potential race in cpu_ipi_send(); as we don't serialize the access
  to cpu_ipi_selected() between MI and MD use (only MI-MI and MD-MD) we
  might catch the NACK bit caused by sending another IPI. Solve this by
  checking the NACK bit in the contents of the interrupt dispatch status
  reg read while interrupts were still turned off instead of reading that
  reg anew after interrupts were turned on again. This is also what the
  CPU docs suggest to do.
- Add a workaround for the SpitFire erratum #54 bug (affecting interrupt
  dispatch). While public info regarding what this CPU bug actually causes
  is not available testing shows that with the workaround in place it's
  less likely to get a "couldn't send ipi" panic, it doesn't solve these
  panics entirely though. [2]

Reported by: kris [1]
Some clue from: kmacy [1]
Info from: Linux, OpenSolaris [2]
Additional testing by: kris
MFC after: 3 days

18 years agoAdd convenience macros for the bits in ASI_ESTATE_ERROR_EN_REG (used
marius [Wed, 29 Mar 2006 00:08:48 +0000 (00:08 +0000)]
Add convenience macros for the bits in ASI_ESTATE_ERROR_EN_REG (used
for ECC handling) and the additional uses of the ASIs 0x77 and 0x7f
as well as their bits (used for a CPU bug workaround).

MFC after: 3 days

18 years agoFix 64-bit DMA. The problem was an incorrect flag check. Thanks to Paul
scottl [Tue, 28 Mar 2006 23:59:07 +0000 (23:59 +0000)]
Fix 64-bit DMA.  The problem was an incorrect flag check.  Thanks to Paul
Saab for helping to track this down.  Fix a error with 32bit DMA size
calculation that seemed to be harmless.  Add a few micro-optimizations while
I'm here.

18 years agoAdd malloc_usable_size(3).
jasone [Tue, 28 Mar 2006 22:16:04 +0000 (22:16 +0000)]
Add malloc_usable_size(3).

Discussed with: arch@

18 years agoFix prototype mismatch and use of un-namespaced pthread functions.
des [Tue, 28 Mar 2006 21:50:12 +0000 (21:50 +0000)]
Fix prototype mismatch and use of un-namespaced pthread functions.

18 years agoFix prototype mismatch.
des [Tue, 28 Mar 2006 21:46:55 +0000 (21:46 +0000)]
Fix prototype mismatch.

18 years ago- Conditionalize Giant around VFS operations for ALQ, ktrace, and
jhb [Tue, 28 Mar 2006 21:30:22 +0000 (21:30 +0000)]
- Conditionalize Giant around VFS operations for ALQ, ktrace, and
  generating a coredump as the result of a signal.
- Fix a bug where we could leak a Giant lock if vn_start_write() failed
  in coredump().

Reported by: jmg (2)

18 years agoConditionalize locking of Giant for VFS in acct(2). We already
jhb [Tue, 28 Mar 2006 21:26:59 +0000 (21:26 +0000)]
Conditionalize locking of Giant for VFS in acct(2).  We already
conditionally acquired Giant in the other parts of the accounting code.

18 years ago- Conditionally acquire Giant in mdstart_vnode(), mdcreate_vnode(), and
jhb [Tue, 28 Mar 2006 21:25:11 +0000 (21:25 +0000)]
- Conditionally acquire Giant in mdstart_vnode(), mdcreate_vnode(), and
  mddestroy() only if the file is from a non-MPSAFE VFS.
- No longer unconditionally hold Giant in the md kthread for vnode-backed
  kthreads.
- Improve the handling of the thread exit race when destroying an md
  device.

18 years agoChange vn_open() to honor the MPSAFE flag in the passed in nameidata object
jhb [Tue, 28 Mar 2006 21:22:08 +0000 (21:22 +0000)]
Change vn_open() to honor the MPSAFE flag in the passed in nameidata object
and use that instead of testing fdidx against -1 to determine if it should
release Giant if Giant was locked due to the requested file residing on a
non-MPSAFE VFS.

Discussed with: jeff

18 years agoUse the read_cycle_count() function recently added for cpu_ticks() for
jhb [Tue, 28 Mar 2006 21:20:12 +0000 (21:20 +0000)]
Use the read_cycle_count() function recently added for cpu_ticks() for
get_cyclecount() as that results in a saner value and makes schedgraph
much happier on Alpha.  (schedgraph doesn't handle the fact that the
counters are out of sync though)

18 years agoUse the correct type for and argument. Recent changes to namespace.h
deischen [Tue, 28 Mar 2006 21:07:59 +0000 (21:07 +0000)]
Use the correct type for and argument.  Recent changes to namespace.h
exposed this bug.

Reported by: kris

18 years ago- Add a comment describing why tick_init() is called before cninit().
marius [Tue, 28 Mar 2006 20:28:31 +0000 (20:28 +0000)]
- Add a comment describing why tick_init() is called before cninit().
- Fix a typo in another comment.

18 years ago- Move the check for too high HZ values from tick_init() to tick_start()
marius [Tue, 28 Mar 2006 20:25:46 +0000 (20:25 +0000)]
- Move the check for too high HZ values from tick_init() to tick_start()
  as we have to call tick_init() before cninit() in order to provide the
  low-level console drivers with a working DELAY() which in turn means we
  cannot use panic() in tick_init().
- s,to high, too high, in the panic string

Inspired by: kmacy's sun4v changes
MFC after: 3 days

18 years agoAdd convenience macros for the full register set and use them to replace
marius [Tue, 28 Mar 2006 19:46:48 +0000 (19:46 +0000)]
Add convenience macros for the full register set and use them to replace
magic constants in clkbrd.c

Info from: OpenSolaris

18 years agoSync with the other archs and declare the memory location referenced by
marius [Tue, 28 Mar 2006 19:19:37 +0000 (19:19 +0000)]
Sync with the other archs and declare the memory location referenced by
the address argument of the bus_space_write_multi_*() familiy as const.

Prodded by: damien

18 years agoAdd semaphore functions, and remove some dupes from the #if 0 section.
des [Tue, 28 Mar 2006 18:48:49 +0000 (18:48 +0000)]
Add semaphore functions, and remove some dupes from the #if 0 section.

18 years agoPreserve previous behaviour of kern.geom.raid3.n{64,16,4}k tunables were 0
pjd [Tue, 28 Mar 2006 18:34:36 +0000 (18:34 +0000)]
Preserve previous behaviour of kern.geom.raid3.n{64,16,4}k tunables were 0
means unlimited.

Reported by: ru
MFC after: 3 days

18 years agoRemove redundant ike rc.d script, since we do not have an IPsec IKE
simon [Tue, 28 Mar 2006 18:28:33 +0000 (18:28 +0000)]
Remove redundant ike rc.d script, since we do not have an IPsec IKE
daemon in the base system and all the IKE daemons in the Ports
Collection has their own rc.d script.

OK'ed by: dougb
Discussed on: freebsd-rc
MFC after: 1 month
Approved by: cperciva (mentor)

18 years agoDon't use dbg if it isn't defined (such as when this file is used by
des [Tue, 28 Mar 2006 18:28:07 +0000 (18:28 +0000)]
Don't use dbg if it isn't defined (such as when this file is used by
code outside of rtld-elf)

18 years agoUse C99's varadic macro syntax instead of gcc's.
des [Tue, 28 Mar 2006 18:26:47 +0000 (18:26 +0000)]
Use C99's varadic macro syntax instead of gcc's.

18 years agoAdd a bunch of missing pthread functions, and move out-of-order functions.
des [Tue, 28 Mar 2006 16:41:06 +0000 (16:41 +0000)]
Add a bunch of missing pthread functions, and move out-of-order functions.

18 years agoRemove unused symbols.
jkoshy [Tue, 28 Mar 2006 16:20:29 +0000 (16:20 +0000)]
Remove unused symbols.

18 years agoDon't call audit_logout() if pwd is NULL, as audit_logout() attempts to
cognet [Tue, 28 Mar 2006 15:30:42 +0000 (15:30 +0000)]
Don't call audit_logout() if pwd is NULL, as audit_logout() attempts to
dereference it.
This will happen if we ^D at the Login: prompt without having provided a
valid login before.
Set pwd to NULL on bad login attempts to prevent audit_logout() from being
called for a user which didn't actually log on.

Reported by:    Jerome Magnin jethro at docisland dot org

18 years agoDocument authpf's requirement for a mounted fdescfs(5).
mlaier [Tue, 28 Mar 2006 15:26:16 +0000 (15:26 +0000)]
Document authpf's requirement for a mounted fdescfs(5).

PR: docs/89635
MFC after: 1 day

18 years agoUse wrapper macros for atomic pointer operations in order to perform the
des [Tue, 28 Mar 2006 14:34:48 +0000 (14:34 +0000)]
Use wrapper macros for atomic pointer operations in order to perform the
correct casts.  This should probably be merged to other architectures.

18 years agoRevert previous commit at davidxu's insistance. Instead, use __DECONST
des [Tue, 28 Mar 2006 14:32:38 +0000 (14:32 +0000)]
Revert previous commit at davidxu's insistance.  Instead, use __DECONST
(argh!) and rearrange the prototypes to make it clear that _umtx_op()
is not deprecated.

18 years agoForcibly turn off all PMCs at module unload time.
jkoshy [Tue, 28 Mar 2006 14:09:21 +0000 (14:09 +0000)]
Forcibly turn off all PMCs at module unload time.

MFC after: 1 week

18 years agoThis comment on various IPPORT_ defines was copied from in.h and
dwmalone [Tue, 28 Mar 2006 12:51:22 +0000 (12:51 +0000)]
This comment on various IPPORT_ defines was copied from in.h and
probably never fully applied to IPv6. Over time it has become more
stale, so replace it with something more up to date.

Reviewed by: ume
MFC after: 1 month

18 years agoRemove manual assignment of m_pkthdr from one mbuf to another in
rwatson [Tue, 28 Mar 2006 10:16:38 +0000 (10:16 +0000)]
Remove manual assignment of m_pkthdr from one mbuf to another in
ipsec_copypkt(), as this is already handled by the call to M_MOVE_PKTHDR(),
which also knows how to correctly handle MAC m_tags.  This corrects a panic
when running with MAC and KAME IPSEC.

PR: kern/94599
Submitted by: zhouyi zhou <zhouyi04 at ios dot cn>
Reviewed by: bz
MFC after: 3 days

18 years agoThe undocumented and deprecated system call _umtx_op() takes two pointer
des [Tue, 28 Mar 2006 09:18:34 +0000 (09:18 +0000)]
The undocumented and deprecated system call _umtx_op() takes two pointer
arguments.  The first one is never used (all callers pass in 0); the
second is sometimes used to pass in a struct timespec * which is used as
a timeout and never modified.  Constify that argument so callers can pass
a const struct timespec * without jumping through hoops.

18 years agoFix memory leak which occurs when crypto.ko module is unloaded.
pjd [Tue, 28 Mar 2006 08:33:30 +0000 (08:33 +0000)]
Fix memory leak which occurs when crypto.ko module is unloaded.

Discussed with: sam
MFC after 3 days

18 years agoIf the query choked with EDNS0, retry without EDNS0.
ume [Tue, 28 Mar 2006 07:42:57 +0000 (07:42 +0000)]
If the query choked with EDNS0, retry without EDNS0.

Obtained from: res_nquery() of BIND9.

18 years agoEr, forgot to clear tls space to zero for Variant II.
davidxu [Tue, 28 Mar 2006 06:14:22 +0000 (06:14 +0000)]
Er, forgot to clear tls space to zero for Variant II.

18 years agoAllocate space for thread pointer, this allows thread library to access
davidxu [Tue, 28 Mar 2006 06:09:24 +0000 (06:09 +0000)]
Allocate space for thread pointer, this allows thread library to access
its pointer from begin, and simplifies _get_curthread() in libthr.

18 years agoHandle invalid capacity parameters from the firmware.
scottl [Tue, 28 Mar 2006 01:59:11 +0000 (01:59 +0000)]
Handle invalid capacity parameters from the firmware.

18 years agoAdd symbol versioning to libm.
deischen [Mon, 27 Mar 2006 23:59:45 +0000 (23:59 +0000)]
Add symbol versioning to libm.

18 years agoMerge conflicts after official patches
ache [Mon, 27 Mar 2006 23:53:05 +0000 (23:53 +0000)]
Merge conflicts after official patches

18 years agoRemove priority mutex code because it does not work correctly,
davidxu [Mon, 27 Mar 2006 23:50:21 +0000 (23:50 +0000)]
Remove priority mutex code because it does not work correctly,
to make it work, turnstile like mechanism to support priority
propagating and other realtime scheduling options in kernel
should be available to userland mutex, for the moment, I just
want to make libthr be simple and efficient thread library.

Discussed with: deischen, julian

18 years agoThis commit was generated by cvs2svn to compensate for changes in r157191,
ache [Mon, 27 Mar 2006 23:45:09 +0000 (23:45 +0000)]
This commit was generated by cvs2svn to compensate for changes in r157191,
which included commits to RCS files with non-trunk default branches.

18 years agoOfficial patches 001-004
ache [Mon, 27 Mar 2006 23:45:09 +0000 (23:45 +0000)]
Official patches 001-004

18 years agoUpgrade to 5.1
ache [Mon, 27 Mar 2006 23:35:05 +0000 (23:35 +0000)]
Upgrade to 5.1

18 years agoUnbreaking build by removing a now unused variable.
avatar [Mon, 27 Mar 2006 23:27:11 +0000 (23:27 +0000)]
Unbreaking build by removing a now unused variable.

18 years agoResolve conflicts
ache [Mon, 27 Mar 2006 23:11:32 +0000 (23:11 +0000)]
Resolve conflicts

18 years agoRemove obsoleted files, update upgrade instructions
ache [Mon, 27 Mar 2006 22:56:23 +0000 (22:56 +0000)]
Remove obsoleted files, update upgrade instructions

18 years agoVirgin import of GNU Readline 5.1
ache [Mon, 27 Mar 2006 22:47:12 +0000 (22:47 +0000)]
Virgin import of GNU Readline 5.1

18 years agoThis commit was generated by cvs2svn to compensate for changes in r157184,
ache [Mon, 27 Mar 2006 22:47:12 +0000 (22:47 +0000)]
This commit was generated by cvs2svn to compensate for changes in r157184,
which included commits to RCS files with non-trunk default branches.

18 years agoUse td_ucred rather than p_ucred to avoid panics and general unhappiness.
jhb [Mon, 27 Mar 2006 19:16:31 +0000 (19:16 +0000)]
Use td_ucred rather than p_ucred to avoid panics and general unhappiness.

Pointy hat to: netchild

18 years agoThis commit was generated by cvs2svn to compensate for changes in r157181,
sam [Mon, 27 Mar 2006 18:15:24 +0000 (18:15 +0000)]
This commit was generated by cvs2svn to compensate for changes in r157181,
which included commits to RCS files with non-trunk default branches.

18 years agoAdd eapol_version config parameter so folks with clients that (bogusly)
sam [Mon, 27 Mar 2006 18:15:24 +0000 (18:15 +0000)]
Add eapol_version config parameter so folks with clients that (bogusly)
require the authenticator announce EAPOL version 1 don't have to hack
the code to get a working setup.

Discussed with Jouni; he's committed a similar set of changes to
his devel branch and I sent him these changes so I'm committing
this on the vendor branch in the expectation it will appear in
the next import.

MFC after: 1 week

18 years agoIf the XSDT address in the RSDP for an ACPI 2.0 machine is NULL, then fall
jhb [Mon, 27 Mar 2006 15:59:48 +0000 (15:59 +0000)]
If the XSDT address in the RSDP for an ACPI 2.0 machine is NULL, then fall
back to using the RSDT instead.  ACPI-CA already follows this same strategy
as a workaround for yet another instance of brain-damaged BIOS writers.

PR: i386/93963
Submitted by: Masayuki FUKUI <fukui.FreeBSD@fanet.net>

18 years ago- Be explicit about libmap32.conf only working on amd64
pav [Mon, 27 Mar 2006 14:37:54 +0000 (14:37 +0000)]
- Be explicit about libmap32.conf only working on amd64

Requested by: ru

18 years ago*sigh*
cognet [Mon, 27 Mar 2006 12:56:29 +0000 (12:56 +0000)]
*sigh*
Move the -lbsdxml after -lgeom, so that ld doesn't get confused and pretend
he can't find the symbol from libbsdxml needed in libgeom.
This should fix the rescue build breakage.

18 years agoReflect progress in process title.
des [Mon, 27 Mar 2006 10:29:12 +0000 (10:29 +0000)]
Reflect progress in process title.

18 years agoAdd a simple netipx TODO list to the end of README, since there are a
rwatson [Mon, 27 Mar 2006 09:10:09 +0000 (09:10 +0000)]
Add a simple netipx TODO list to the end of README, since there are a
number of problems with netipx that I have not yet resolved, and I
don't want them lost track of.

MFC after: 1 month

18 years agoComment out -g compiler option, found by 'FreeBSD Build Options Survey'.
davidxu [Mon, 27 Mar 2006 05:58:58 +0000 (05:58 +0000)]
Comment out -g compiler option, found by 'FreeBSD Build Options Survey'.

18 years agoUnbreak the build.
jasone [Mon, 27 Mar 2006 05:33:35 +0000 (05:33 +0000)]
Unbreak the build.

18 years agoimplement set(IEEE80211_IOC_STA_STATS) for hostapd; for
sam [Mon, 27 Mar 2006 05:22:35 +0000 (05:22 +0000)]
implement set(IEEE80211_IOC_STA_STATS) for hostapd; for
now just make it clear station statistics (could read
a stat block and assign to caller can do partial changes)

Reviewed by: avatar (previous version)
MFC after: 1 week

18 years agoUse NET_LOCK_GIANT() and VFS_LOCK_GIANT() instead of unconditionally
alc [Mon, 27 Mar 2006 04:23:16 +0000 (04:23 +0000)]
Use NET_LOCK_GIANT() and VFS_LOCK_GIANT() instead of unconditionally
acquiring Giant in kern_sendfile().

Guard against the forced reclamation of a vnode in kern_sendfile().

Discussed with: jeff
Reviewed by: tegge
MFC after: 3 weeks

18 years agoCanonicalize copyright order in one more file that contains my
rwatson [Mon, 27 Mar 2006 01:12:58 +0000 (01:12 +0000)]
Canonicalize copyright order in one more file that contains my
copyright.

MFC after: 1 month

18 years ago- Document LD_32_* environment variables
pav [Mon, 27 Mar 2006 00:53:58 +0000 (00:53 +0000)]
- Document LD_32_* environment variables
- Mention 32-bit files in FILES section

MFC after: 1 week

18 years ago- Document libmap32.conf
pav [Mon, 27 Mar 2006 00:53:11 +0000 (00:53 +0000)]
- Document libmap32.conf

MFC after: 1 week

18 years agoIn spx_output(), use M_DONTWAIT instead of M_TRYWAIT, as we hold the
rwatson [Mon, 27 Mar 2006 00:48:21 +0000 (00:48 +0000)]
In spx_output(), use M_DONTWAIT instead of M_TRYWAIT, as we hold the
ipxpcb mutex.  Contrary to the comment, even in 4.x this was unsafe,
as parallel use of the socket by another process would result in pcb
corruption if the mbuf allocation slept.

MFC after: 1 month

18 years agoFor now, bring back some of the old bits as a fix for specifying md(4)
wkoszek [Mon, 27 Mar 2006 00:46:22 +0000 (00:46 +0000)]
For now, bring back some of the old bits as a fix for specifying md(4)
device number at creation time with -u option. Together with XMLizing
mdconfig(8), I broke this functionality.

This change is temporary. Complete fix will be commited soon.

Approved by: cognet (mentor)

18 years agoErm don't use -mno-apcs-frame if we're going to do profiling either, it's not
cognet [Mon, 27 Mar 2006 00:32:46 +0000 (00:32 +0000)]
Erm don't use -mno-apcs-frame if we're going to do profiling either, it's not
exactly compatible.

18 years agoIn spx_input(), change a '&&' to a '||', as the spx trace code is able
rwatson [Mon, 27 Mar 2006 00:08:32 +0000 (00:08 +0000)]
In spx_input(), change a '&&' to a '||', as the spx trace code is able
to handle a NULL 'cb' here.

MFC after: 1 month

18 years agoAdd spxabort, a simple netipx/spx regression test that triggers
rwatson [Mon, 27 Mar 2006 00:03:37 +0000 (00:03 +0000)]
Add spxabort, a simple netipx/spx regression test that triggers
pru_abort() by closing a listen socket while completed connections are
presenting in its listen queue.  Unfortunately, it's difficult to
trigger the other two pru_abort() cases using user APIs, so they are
not covered by this test.

18 years agoAllow the 'n' option to decrease the number of arenas below the default,
jasone [Sun, 26 Mar 2006 23:41:35 +0000 (23:41 +0000)]
Allow the 'n' option to decrease the number of arenas below the default,
to as little as one arena.  Also, limit the number of arenas to avoid a
potential invariant violation in base_alloc().

18 years agoAdd comments and reformat/rearrange code. There are no significant
jasone [Sun, 26 Mar 2006 23:37:25 +0000 (23:37 +0000)]
Add comments and reformat/rearrange code.  There are no significant
functional changes in this commit.

18 years agoTeach md(4) and mdconfig(8) how to understand XML. Right now there won't be
wkoszek [Sun, 26 Mar 2006 23:21:11 +0000 (23:21 +0000)]
Teach md(4) and mdconfig(8) how to understand XML. Right now there won't be
a problem with listing large number of md(4) devices. Either 'list' or
'query' mode uses XML.

Additionally, new functionality was introduced. It's possible to pass
multiple devices to -u:

# ./mdconfig -l -u md0,md1

Approved by: cognet (mentor)

18 years agoKeep proper order of includes. Additionally, sort them. Make functions used
wkoszek [Sun, 26 Mar 2006 22:52:36 +0000 (22:52 +0000)]
Keep proper order of includes. Additionally, sort them. Make functions used
in that file static.

Approved by: cognet (mentor)

18 years agoAdd a sysctl, regression.sonewconn_earlytest, which when options
rwatson [Sun, 26 Mar 2006 22:44:37 +0000 (22:44 +0000)]
Add a sysctl, regression.sonewconn_earlytest, which when options
REGRESSION is enabled, allows user space to dictate that sonewconn()
should skip it's "skip the hard work" check to see if the listen
queue is full, and instead proceed with allocation of a socket and
trimming of the overflowed queue.  This makes it easier to test the
queue overflow logic.

MFC after: 1 month

18 years agoDeclare regression subtree in sysctl.h so that components outside of
rwatson [Sun, 26 Mar 2006 22:29:45 +0000 (22:29 +0000)]
Declare regression subtree in sysctl.h so that components outside of
kern_mib.c can easily add regression sysctls.

MFC after: 1 month

18 years agoImplement pmap_object_init_pt() the way it is on sparc64/alpha, by doing
cognet [Sun, 26 Mar 2006 22:03:43 +0000 (22:03 +0000)]
Implement pmap_object_init_pt() the way it is on sparc64/alpha, by doing
nothing except asserting the vm object is locked, and a device object,
instead of a useless printf.

18 years agoAssert that the mbuf is not shared to ensure problems like the last commit are
thompsa [Sun, 26 Mar 2006 20:52:47 +0000 (20:52 +0000)]
Assert that the mbuf is not shared to ensure problems like the last commit are
not reintroduced.

18 years agoIn spx_accept, assert ipxp != NULL, not == NULL.
rwatson [Sun, 26 Mar 2006 19:51:44 +0000 (19:51 +0000)]
In spx_accept, assert ipxp != NULL, not == NULL.

MFC after: 1 month

18 years agoIn various SPX protocol entry points from the socket layer, check
rwatson [Sun, 26 Mar 2006 19:37:37 +0000 (19:37 +0000)]
In various SPX protocol entry points from the socket layer, check
IPXP_DROPPED before continuing, and return EINVAL or ECONNRESET if
it is flagged.  It's unclear why each situation should be one or
the other, but it is copied from netinet which has the same bugs.

MFC after: 1 month

18 years agoAdd simple regression test to ping pong a data packet over SPX in stream
rwatson [Sun, 26 Mar 2006 19:10:27 +0000 (19:10 +0000)]
Add simple regression test to ping pong a data packet over SPX in stream
mode.  Support both connection via connect() and sendto(), but don't
compile in sendto() for now, since netipx doesn't appear to actually
implement that (doh).

18 years agoAdd a simple IPX datagram regression test, which opens two IPX datagram
rwatson [Sun, 26 Mar 2006 18:25:53 +0000 (18:25 +0000)]
Add a simple IPX datagram regression test, which opens two IPX datagram
sockets, binds a local port, sends a datagram, and confirms that it is
received.

18 years agoAdd a short README with configuration hints to get the netipx regression
rwatson [Sun, 26 Mar 2006 17:42:04 +0000 (17:42 +0000)]
Add a short README with configuration hints to get the netipx regression
tests up and running.  This is likely a message to myself in six months
when I've completely forgotten how.

18 years agoUse tr(1) to lowercase strings in a way which works with all locales.
simon [Sun, 26 Mar 2006 17:17:10 +0000 (17:17 +0000)]
Use tr(1) to lowercase strings in a way which works with all locales.

Approved by: cperciva (mentor)

18 years agoModify ipxsocket regression test to create and close sockets several
rwatson [Sun, 26 Mar 2006 15:49:35 +0000 (15:49 +0000)]
Modify ipxsocket regression test to create and close sockets several
times, with variable length sleeps between socket() and close().  This
will help to ensure that IPX/SPX timers fire while the sockets are
open, and hence have PCB's on the IPX pcb list, so that if timers are
going to stumble over PCB types they don't expect, it will happen as
part of this test.

18 years agoAdd a new ipxpcb flag, IPXP_SPX, which is set on ipxpcb's to mark them
rwatson [Sun, 26 Mar 2006 15:41:44 +0000 (15:41 +0000)]
Add a new ipxpcb flag, IPXP_SPX, which is set on ipxpcb's to mark them
as belonging to SPX.  This replaces the implicit assumption that the cb
pointer for non-SPX pcb's will be NULL.  This isn't required in TCP/IP
as different pcb lists are maintained for different IP protocols; IPX
stores all pcbs on the same global ipxpcb_list.

Foot provided by: gnn
MFC after: 1 month

18 years agoMFP4: Support for profiling dynamically loaded objects.
jkoshy [Sun, 26 Mar 2006 12:20:54 +0000 (12:20 +0000)]
MFP4: Support for profiling dynamically loaded objects.

Kernel changes:

  Inform hwpmc of executable objects brought into the system by
  kldload() and mmap(), and of their removal by kldunload() and
  munmap().  A helper function linker_hwpmc_list_objects() has been
  added to "sys/kern/kern_linker.c" and is used by hwpmc to retrieve
  the list of currently loaded kernel modules.

  The unused `MAPPINGCHANGE' event has been deprecated in favour
  of separate `MAP_IN' and `MAP_OUT' events; this change reduces
  space wastage in the log.

  Bump the hwpmc's ABI version to "2.0.00".  Teach hwpmc(4) to
  handle the map change callbacks.

  Change the default per-cpu sample buffer size to hold
  32 samples (up from 16).

  Increment __FreeBSD_version.

libpmc(3) changes:

  Update libpmc(3) to deal with the new events in the log file; bring
  the pmclog(3) manual page in sync with the code.

pmcstat(8) changes:

  Introduce new options to pmcstat(8): "-r" (root fs path), "-M"
  (mapfile name), "-q"/"-v" (verbosity control).  Option "-k" now
  takes a kernel directory as its argument but will also work with
  the older invocation syntax.

  Rework string handling in pmcstat(8) to use an opaque type for
  interned strings.  Clean up ELF parsing code and add support for
  tracking dynamic object mappings reported by a v2.0.00 hwpmc(4).

  Report statistics at the end of a log conversion run depending
  on the requested verbosity level.

Reviewed by: jhb, dds (kernel parts of an earlier patch)
Tested by: gallatin (earlier patch)

18 years agoDefine two new inpcb flags in the inp_vflag field, which for whatever
rwatson [Sun, 26 Mar 2006 11:30:31 +0000 (11:30 +0000)]
Define two new inpcb flags in the inp_vflag field, which for whatever
reason, seems to be where new flags are getting defined:

INP_DROPPED - The protocol has terminated this connection and the socket
              is not reusable: when the socket code enters the protocol,
              an error is immediately returned.  This will substitute for
              NULLing the so_pcb socket field, helping to implement the
              invariant that all valid sockets have valid pcb's in TCP.

INP_SOCKREF - The protocol has become the owner of the socket reference,
              and will need to free it when freeing the pcb, which will
              be used when a TCP socket is closed but still has queued
              data.

MFC after: 1 month

18 years agoMinor style tweak: tab after #define, not space.
rwatson [Sun, 26 Mar 2006 11:26:12 +0000 (11:26 +0000)]
Minor style tweak: tab after #define, not space.

MFC after: 1 month

18 years agoCorrect bad format args. Interesting- the lines that generated
mjacob [Sun, 26 Mar 2006 07:16:17 +0000 (07:16 +0000)]
Correct bad format args. Interesting- the lines that generated
the error on sparc64 hadn't changed since the last checkin, pass
LINT on other platforms and mpt doesn't work on sparc64 anyway
and the tinderbox build didn't work for me in a cross build case
on my main build machine (which runs RELENG_6). Sigh. Still
need to try harder.

18 years agoRestore original formulation of SPX segment queue draining during SPX
rwatson [Sun, 26 Mar 2006 02:33:44 +0000 (02:33 +0000)]
Restore original formulation of SPX segment queue draining during SPX
PCB detach.

MFC after: 1 month

18 years agoAdd simple ipxsocket regression test: open, and close, various IPX socket
rwatson [Sun, 26 Mar 2006 01:58:39 +0000 (01:58 +0000)]
Add simple ipxsocket regression test: open, and close, various IPX socket
types supported by the FreeBSD netipx implementation.