]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoRough implementation of the create and add verbs. The verbs cause
marcel [Sun, 9 Oct 2005 17:10:35 +0000 (17:10 +0000)]
Rough implementation of the create and add verbs. The verbs cause
in-memory changes only and as such are only useful for prototyping
and regression testing purposes.

18 years agoMake sure that the created fifo gets deleted if the top level make instance
scottl [Sun, 9 Oct 2005 06:36:51 +0000 (06:36 +0000)]
Make sure that the created fifo gets deleted if the top level make instance
exits due to a signal.

18 years agoFinish off style(9) fixes which I started two revisions ago. This basically
csjp [Sun, 9 Oct 2005 04:45:41 +0000 (04:45 +0000)]
Finish off style(9) fixes which I started two revisions ago. This basically
changes the indentation style from 4 spaces to 8 spaces which we expect to
see in other FreeBSD source files.

18 years ago- Do not hardcode the bsize to a sectorsize of 2048, even though
rodrigc [Sun, 9 Oct 2005 04:45:33 +0000 (04:45 +0000)]
- Do not hardcode the bsize to a sectorsize of 2048, even though
  the UDF specification specifies a logical sectorsize of 2048.
  Instead, get it from GEOM.
- When reading the UDF Anchor Volume Descriptor, use the logical
  sectorsize of 2048 when calculating the offset to read from, but
  use the actual sectorsize to determine how much to read.

- works with reading a DVD disk and a DVD disk image file via mdconfig
- correctly returns EINVAL if we try to mount_udf an audio CD, instead
  of panicking inside GEOM when INVARIANTS is set

18 years agoSync whitespace change that is found uniquely in RELENG_6, to reduce diff
delphij [Sun, 9 Oct 2005 04:44:51 +0000 (04:44 +0000)]
Sync whitespace change that is found uniquely in RELENG_6, to reduce diff
against it.

18 years agoWoops, in my previous commit, I actually committed some style changes with
csjp [Sun, 9 Oct 2005 04:40:56 +0000 (04:40 +0000)]
Woops, in my previous commit, I actually committed some style changes with
a functional change. I know this is a big no no, so this is a forced commit
to note the functional changes from my previous revision:

@@ -196,7 +176,7 @@ wait_for_lock(const char *name, int flag
     int fd;

     if ((fd = open(name, O_CREAT|O_RDONLY|O_EXLOCK|flags, 0666)) == -1) {
- if (errno == ENOENT || errno == EINTR || errno == EAGAIN)
+ if (errno == EINTR || errno == EAGAIN)
      return (-1);
  err(EX_CANTCREAT, "cannot open %s", name);
     }

18 years agoOops, the last-minute optimization in rev.1.8 wasn't a good idea. The
bde [Sun, 9 Oct 2005 04:29:08 +0000 (04:29 +0000)]
Oops, the last-minute optimization in rev.1.8 wasn't a good idea.  The
17+17+24 bit pi/2 must only be used when subtraction of the first 2
terms in it from the arg is exact.  This happens iff the the arg in
bits is one of the 2**17[-1] values on each side of (float)(pi/2).

Revert to the algorithm in rev.1.7 and only fix its threshold for using
the 3-term pi/2.  Use the threshold that maximizes the number of values
for which the 3-term pi/2 is used, subject to not changing the algorithm
for comparing with the threshold.  The 3-term pi/2 ends up being used
for about half of its usable range (about 64K values on each side).

18 years agoLock object while we iterate through it's backing objects.
csjp [Sun, 9 Oct 2005 02:37:27 +0000 (02:37 +0000)]
Lock object while we iterate through it's backing objects.

Discussed with: alc

18 years agoFixed syntax error (a missing brace) in previous commit.
bde [Sat, 8 Oct 2005 22:55:36 +0000 (22:55 +0000)]
Fixed syntax error (a missing brace) in previous commit.

18 years agobridge.4 is now mlinked to if_bridge.4 so do not list it for deletion.
thompsa [Sat, 8 Oct 2005 22:51:47 +0000 (22:51 +0000)]
bridge.4 is now mlinked to if_bridge.4 so do not list it for deletion.

18 years agoFixed range reduction near (but not very near) +-pi/2. A bug caused
bde [Sat, 8 Oct 2005 22:43:55 +0000 (22:43 +0000)]
Fixed range reduction near (but not very near) +-pi/2.  A bug caused
a maximum error of 2.905 ulps for cosf(), but the algorithm for cosf()
is good for < 1 ulps and happens to give perfect rounding (< 0.5 ulps)
near +-pi/2 except for the bug.  The extra relative errors for tanf()
were similar (slightly larger).  The bug didn't affect sinf() since
sinf'(+-pi/2) is 0.

For range reduction in ~[-3pi/4, -pi/4] and ~[pi/4, 3pi/4] we must
subtract +-pi/2 and the only complication is that this must be done
in extra precision.  We have handy 17+24-bit and 17+17+24-bit
approximations to pi/2.  If we always used the former then we would
lose up to 24 bits of accuracy due to cancelation of leading bits, but
we need to keep at least 24 bits plus a guard digit or 2, and should
keep as many guard bits as efficiency permits.  So we used the
less-precise pi/2 not very near +-pi/2 and switched to using the
more-precise pi/2 very near +-pi/2.  However, we got the threshold for
the switch wrong by allowing 19 bits to cancel, so we ended up with
only 21 or 22 bits of accuracy in some cases, which is even worse than
naively subtracting pi/2 would have done.

Exhaustive checking shows that allowing only 17 bits to cancel (min.
accuracy ~24 bits) is sufficient to reduce the maximum error for cosf()
near +-pi/2 to 0.726 ulps, but allowing only 6 bits to cancel (min.
accuracy ~35-bits) happens to give perfect rounding for cosf() at
little extra cost so we prefer that.

We actually (in effect) allow 0 bits to cancel and always use the
17+17+24-bit pi/2 (min. accuracy ~41 bits).  This is simpler and
probably always more efficient too.  Classifying args to avoid using
this pi/2 when it is not needed takes several extra integer operations
and a branch, but just using it takes only 1 FP operation.

The patch also fixes misspelling of 17 as 24 in many comments.

For the double-precision version, the magic numbers include 33+53 bits
for the less-precise pi/2 and (53-32-1 = 20) bits being allowed to
cancel, so there are ~33-20 = 13 guard bits.  This is sufficient except
probably for perfect rounding.  The more-precise pi/2 has 33+33+53
bits and we still waste time classifying args to avoid using it.

The bug is apparently from mistranslation of the magic 32 in 53-32-1.
The number of bits allowed to cancel is not critical and we use 32 for
double precision because it allows efficient classification using a
32-bit comparison.  For float precision, we must use an explicit mask,
and there are fewer bits so there is less margin for error in their
allocation.  The 32 got reduced to 4 but should have been reduced
almost in proportion to the reduction of mantissa bits.

18 years agoUe a better msleep identifier. Fix some whitespace.
scottl [Sat, 8 Oct 2005 22:41:57 +0000 (22:41 +0000)]
Ue a better msleep identifier.  Fix some whitespace.

18 years agoaac_intr0 rotted long ago, remove it.
scottl [Sat, 8 Oct 2005 22:36:54 +0000 (22:36 +0000)]
aac_intr0 rotted long ago, remove it.

18 years agoAs alc pointed out to me, vm_page.c 1.305 was incomplete: uma_startup()
des [Sat, 8 Oct 2005 21:03:54 +0000 (21:03 +0000)]
As alc pointed out to me, vm_page.c 1.305 was incomplete: uma_startup()
still uses the constant UMA_BOOT_PAGES.  Change it to accept boot_pages
as an additional argument.

MFC after: 2 weeks

18 years agoMega Update to the aac driver to support a whole new family of cards and
scottl [Sat, 8 Oct 2005 15:55:09 +0000 (15:55 +0000)]
Mega Update to the aac driver to support a whole new family of cards and
the modified interface that they use.  Changes include:

- Register a different interrupt handler for the new interface.  This one is
  INTR_MPSAFE, not INTR_FAST, and directly processes completions and AIFs.
- Add an event registration and callback mechanism for the ioctl and CAM
  modules can know when a resource shortage clears.  This condition was
  previously fatal in CAM due to programming oversights.
- Fix locking to play better with newbus.
- Provide access methods for talking to cards with the NEWCOMM interface.
- Fix up the CAM module to be better suited for dealing with newer firmware
  on the PERC Si/Di series that requires talking to plain SCSI via aac.
- Add a whole slew of new PCI Id's.

Thanks to Adaptec for providing an initial version of this work and for
answering countless questions about it.  There are still some rough edges in
this, but it works well enough to commit and test for now.

Obtained from: Adaptec, Inc.

18 years agoIn ngt_input(), do not derefer sc (= (sc_p) tp->t_lsc) before making
tanimura [Sat, 8 Oct 2005 11:03:29 +0000 (11:03 +0000)]
In ngt_input(), do not derefer sc (= (sc_p) tp->t_lsc) before making
sure sc != NULL.

18 years agoMFP4: More removal of unused stuff.
imp [Sat, 8 Oct 2005 06:58:51 +0000 (06:58 +0000)]
MFP4: More removal of unused stuff.

18 years agoMFP4: Changes to hopefully make the new power code work better
imp [Sat, 8 Oct 2005 06:57:13 +0000 (06:57 +0000)]
MFP4: Changes to hopefully make the new power code work better

o Rather than just try to turn off EXCA_INTR_RESET, set the entire register
  to 0.  This is slightly faster, and a better hammer.
o Move attempted clearing of the output enable (EXCA_PWRCTL_OE) back to
  after we turn off the power.  Modify it to write 0 so that we don't get
  Bad Vcc messages on TI bridges (untested, but ru@ sent me a similar patch)
  while at the same time avoiding interrupt storms on Ricoh bridges (tested
  by me on my Sony).

# Many of my observations of 'breakage' for this patch are due to some bug
# in the load/unload of cbb.ko unlreated to this change.  I'll be investigating
# and fixing that bug in the fullness of time.

18 years agoMFP4: We no longer use intr_handlers, so remove it.
imp [Sat, 8 Oct 2005 06:53:17 +0000 (06:53 +0000)]
MFP4: We no longer use intr_handlers, so remove it.

18 years agoMFP4: Note why we do the dance we do for waiting for the thread to die.
imp [Sat, 8 Oct 2005 06:51:47 +0000 (06:51 +0000)]
MFP4: Note why we do the dance we do for waiting for the thread to die.

18 years agoRemove a couple of explicit memset(0) ops that were zeroing past the end of
scottl [Sat, 8 Oct 2005 05:16:45 +0000 (05:16 +0000)]
Remove a couple of explicit memset(0) ops that were zeroing past the end of
an allocation.  This fixes the malloc 'use after free' panic on boot that
many were seeing.  It doesn't solve the problem of the allocations being
cached and then written past their bounds later.  That will take more work.

Submitted by: kan

18 years agoNow that bridge(4) has been removed, link bridge.4 to if_bridge.4
thompsa [Sat, 8 Oct 2005 01:20:53 +0000 (01:20 +0000)]
Now that bridge(4) has been removed, link bridge.4 to if_bridge.4

Reviewed by: mlaier

18 years agoFixed profiling of main() for amd64 and i386. This started rotting
bde [Fri, 7 Oct 2005 22:13:17 +0000 (22:13 +0000)]
Fixed profiling of main() for amd64 and i386.  This started rotting
in 1993 in rev.1.5 of the i386 a.out version (csu/i386/crt0.c).
Profiling uses a magic label "eprol" to delimit the start of the part
of the text section covered by profiling.  This label must be placed
before the call to main() to get main() properly profiled.  It was
placed there in rev.1.1 of crt0.c.  Rev.1.5 imported the initial
implementation of shared libraries in FreeBSD and misplaced the label.
Fortunately, the misplaced label was misspelled and the old label
wasn't removed, so the new label had no effect.  Unfortunately, when
profiling was implemented for the ELF in 1998 in rev.1.2 of
csu/i386-elf/crt1.c, only the incorrectly placed label was copied
(after fixing its name).  The bug was then copied to all other arches.
The label seems to be still misplaced in NetBSD for most arches.  It
is in common.c for most arches so it is even further from being inside
the function that calls main().

I think "eprol" is short for "end of prologue", but it must be placed
before the end of the prologue so that it covers main().  crt0.c has
it before the calls atexit(_mcleanup) and monstartup(...), but it
cannot affect these calls so I moved it after the call to monstartup().
It now also covers the call to _init() but not the newer call to
_init_tls().  Profiling of _init() seems to be harmless, and the call
to _init_tls() seems to be misplaced.

Reviewed by: jdp (long ago, for a slightly different i386 version)

18 years agoImport iwi-specific tools. Can help debug firmware or connection issues.
damien [Fri, 7 Oct 2005 18:27:21 +0000 (18:27 +0000)]
Import iwi-specific tools.  Can help debug firmware or connection issues.

18 years agoFixes my previous commit (rev 1.20)
damien [Fri, 7 Oct 2005 18:11:32 +0000 (18:11 +0000)]
Fixes my previous commit (rev 1.20)

MFC after: 1 day

18 years agoA deja vu of:
glebius [Fri, 7 Oct 2005 14:14:47 +0000 (14:14 +0000)]
A deja vu of:

  http://lists.freebsd.org/pipermail/cvs-src/2004-October/033496.html

The same problem applies to if_bridge(4), too.

- Copy-and-paste the if_bridge(4) related block from
  if_ethersubr.c to ng_ether.c
- Add XXXs, so that copy-and-paste would be noticed by
  any future editors of this code.
- Also add XXXs near if_bridge(4) declarations.

Silence from: thompsa

18 years agoAdd parse_uuid() that creates a binary representation of an UUID from
marcel [Fri, 7 Oct 2005 13:37:10 +0000 (13:37 +0000)]
Add parse_uuid() that creates a binary representation of an UUID from
a string representation.

18 years agoCatch up with increasing the resolution suitable for high-res kernel
bde [Fri, 7 Oct 2005 11:58:46 +0000 (11:58 +0000)]
Catch up with increasing the resolution suitable for high-res kernel
profiling from microseconds to nanoseconds in 1996.  Picoseconds are
already needed.

Describe the choice of units for the per-call times in detail.

18 years agoDo not ignore ENOENT
csjp [Fri, 7 Oct 2005 11:49:27 +0000 (11:49 +0000)]
Do not ignore ENOENT

Pointed out by: Amir Shalem

18 years agoImprove printing of self times in the flat profile for functions that
bde [Fri, 7 Oct 2005 10:59:41 +0000 (10:59 +0000)]
Improve printing of self times in the flat profile for functions that
appear to be never called:

(1) If a function is never called according to its call count but it
    must have been called because its child time is nonzero, then print
    it in the flat profile.  Previously, if its call count was zero
    then we only printed it in the flat profile if its self time was
    nonzero.

(2) If a function has a zero call count but has a nonzero self or child
    time, then print its total self time in the self time per call
    column as a percentage of the total (self + child) time.  It is
    not possible to print the times per call in this case because the
    call count is zero.  Previously, this was handled by leaving both
    per-call columns blank.  The self time is printed in another column
    but there was no way to recover the total time.

(1) partially fixes the case of the "never called" function main() and
prepares for (2) to apply to main() and other functions.  Profiling
of main() was lost in the conversion from a.out to ELF, so main()'s
call count has always been zero for many years; then in the common
case where main() is a tiny function, it gets no profiling ticks, so
main() was completely lost in the flat profile.

(2) improves mainly cases like kernel threads.  Most kernel threads
appear to be never called because they are always started before
userland can run to turn on profiling.  As for main(), the fact that
they are called is not very interesting and their callers are
uninteresting, but their relative self time is interesting since they
are long-running.

Almost always printing percentages in the per-call columns would be
more useful than almost always printing 0.0ms.  0.1ms is now a long
time, so only very large functions take that long per call.  The accuracy
per call can approach 1-10 nsec provided programs are run for about
100000 times as long as is necessary to get this accuracy with high
resolution kernel profiling.

18 years agoWe don't need 'imp' here.
pjd [Fri, 7 Oct 2005 10:30:47 +0000 (10:30 +0000)]
We don't need 'imp' here.

18 years agoSync usage screen with manpage.
yar [Fri, 7 Oct 2005 10:18:44 +0000 (10:18 +0000)]
Sync usage screen with manpage.

MFC after: 5 days

18 years agoDocument the -d flag to mail(1) better, which comes handy when
yar [Fri, 7 Oct 2005 10:16:41 +0000 (10:16 +0000)]
Document the -d flag to mail(1) better, which comes handy when
you want to see, e.g., sendmail arguments mail(1) will use.

-H is not an independent flag, it's a modifier.  Also explicitly
say that -H will cause mail(1) to exit as soon as it prints the headers.

MFC after: 5 days

18 years agoPolling is now configured with help of ifconfig(8), not sysctl.
glebius [Fri, 7 Oct 2005 09:23:51 +0000 (09:23 +0000)]
Polling is now configured with help of ifconfig(8), not sysctl.

Prodded by:     maxim

18 years agoPolling is now configured with help of ifconfig(8), not sysctl.
glebius [Fri, 7 Oct 2005 08:55:58 +0000 (08:55 +0000)]
Polling is now configured with help of ifconfig(8), not sysctl.

Prodded by:  maxim

18 years agoo Mention the fact dcons(4) depends on "options GDB".
maxim [Fri, 7 Oct 2005 06:43:04 +0000 (06:43 +0000)]
o Mention the fact dcons(4) depends on "options GDB".

Reviewed by: simokawa, ru (mdoc markup)
MFC after: 1 week

18 years agoSwitch from K&R-style C prototypes to ISO/ANSI-style C prototypes.
rodrigc [Fri, 7 Oct 2005 06:39:08 +0000 (06:39 +0000)]
Switch from K&R-style C prototypes to ISO/ANSI-style C prototypes.

18 years agosnd_ess needs snd_sbc, so add a note about that.
joel [Fri, 7 Oct 2005 06:32:11 +0000 (06:32 +0000)]
snd_ess needs snd_sbc, so add a note about that.

18 years agoWork around an apparent mdoc(7) bug.
trhodes [Fri, 7 Oct 2005 02:32:16 +0000 (02:32 +0000)]
Work around an apparent mdoc(7) bug.

Spotted by: marius
Discussed with: ru

18 years agoDocument recently added security.mac.seeotheruids.suser_privileged sysctl.
trhodes [Fri, 7 Oct 2005 02:29:50 +0000 (02:29 +0000)]
Document recently added security.mac.seeotheruids.suser_privileged sysctl.

18 years agoBump WARNS up to 3.
rodrigc [Fri, 7 Oct 2005 02:22:48 +0000 (02:22 +0000)]
Bump WARNS up to 3.

18 years agoIn prmount(), use an unsigned int variable to eliminate
rodrigc [Fri, 7 Oct 2005 02:22:04 +0000 (02:22 +0000)]
In prmount(), use an unsigned int variable to eliminate
'comparison between signed and unsigned' compiler warning.

18 years agoSwitch from K&R-style C prototypes to ISO/ANSI-style C prototypes.
rodrigc [Fri, 7 Oct 2005 02:18:20 +0000 (02:18 +0000)]
Switch from K&R-style C prototypes to ISO/ANSI-style C prototypes.
Make prototype in extern.h match prototype in mount_ufs.c

18 years agoDisplay the status of the spanning tree for each port.
thompsa [Fri, 7 Oct 2005 00:32:16 +0000 (00:32 +0000)]
Display the status of the spanning tree for each port.

        member: xl0 flags=7<LEARNING,DISCOVER,STP>
        member: gem0 flags=7<LEARNING,DISCOVER,STP>
to:
        member: xl0 flags=7<LEARNING,DISCOVER,STP>
                port 3 priority 128 path cost 55 forwarding
        member: gem0 flags=7<LEARNING,DISCOVER,STP>
                port 1 priority 128 path cost 55 learning

18 years agoEliminate __RMAN_RESOURCE_VISIBLE hack entirely by moving the struct
phk [Thu, 6 Oct 2005 21:49:31 +0000 (21:49 +0000)]
Eliminate __RMAN_RESOURCE_VISIBLE hack entirely by moving the struct
resource_ to subr_rman.c where it belongs.

18 years agoo Use firmware extended scan command; this one doesn't crash when scanning
damien [Thu, 6 Oct 2005 20:11:01 +0000 (20:11 +0000)]
o Use firmware extended scan command; this one doesn't crash when scanning
  the 5GHz band.
o Enable 802.11a channels scanning for 2915ABG adapters.
o Fix a typo (negociated->negotiated).

With hints from NetBSD.

MFC after: 2 days

18 years agoMake sure that the worker thread knows the type early enough to
phk [Thu, 6 Oct 2005 19:47:04 +0000 (19:47 +0000)]
Make sure that the worker thread knows the type early enough to
grab Giant for vnode backing.

Found by: pho & tegge

18 years agoAdding myself to calendar.freebsd
ehaupt [Thu, 6 Oct 2005 19:16:55 +0000 (19:16 +0000)]
Adding myself to calendar.freebsd

Approved by: novel (mentor)

18 years agoBackout strtok() addition to libkern, strsep() is enough and strtok()
pjd [Thu, 6 Oct 2005 19:06:07 +0000 (19:06 +0000)]
Backout strtok() addition to libkern, strsep() is enough and strtok()
is not safe.

Discussed with: stefanf, njl

18 years ago- Use strsep() instead of strtok().
pjd [Thu, 6 Oct 2005 19:04:08 +0000 (19:04 +0000)]
- Use strsep() instead of strtok().
- strdup() uses M_WAITOK, so we don't need to check it's return value
  against NULL.

MFC after: 2 weeks

18 years agoFix another edge case I just noticed when committing the previous changes:
jhb [Thu, 6 Oct 2005 18:41:31 +0000 (18:41 +0000)]
Fix another edge case I just noticed when committing the previous changes:
If bus_setup_intr() fails, cleanup the ifnet setup in vx_attach() by
calling ether_ifdetach() and if_free().

MFC after: 1 week

18 years agoRototill vx(4), add locking, and mark MPSAFE:
jhb [Thu, 6 Oct 2005 18:27:59 +0000 (18:27 +0000)]
Rototill vx(4), add locking, and mark MPSAFE:
- Rename vxfoo() functions to vx_foo() to improve readability and
  consistency with other drivers.
- Prefix most the softc members with 'vx_' (the other members already had
  the prefix).
- Switch to using callout_init_mtx() and callout_*() rather than
  timeout() and untimeout().
- Add some missing calls to if_free() in some failure cases in vx_attach().
- Use if_printf() and remove the unit number from the softc.
- Remove uses of the 'register' keyword and spls.
- Add locked variants of vx_init() and vx_start().
- Add a mutex to the softc and lock it in various appropriate places.
- Setup the interrupt handler last during attach.

Tested by: imp
MFC after: 1 week

18 years agoEliminate need for __RMAN_RESOURCE_VISIBLE
phk [Thu, 6 Oct 2005 17:39:18 +0000 (17:39 +0000)]
Eliminate need for __RMAN_RESOURCE_VISIBLE

Reviewed by: marcel@

18 years agoAdd support for setting the SG list segment size.
sos [Thu, 6 Oct 2005 15:44:07 +0000 (15:44 +0000)]
Add support for setting the SG list segment size.
Use this for the SiI3112 workaround to get rid of the "oversized DMA" errors.

MFC to 6.0 candidate.

18 years agoEliminate some unneeded code bits.
yar [Thu, 6 Oct 2005 15:05:55 +0000 (15:05 +0000)]
Eliminate some unneeded code bits.

18 years agoDon't hard-code port numbers, let the user specify them.
rwatson [Thu, 6 Oct 2005 12:20:33 +0000 (12:20 +0000)]
Don't hard-code port numbers, let the user specify them.

18 years agoExport PAGE_SIZE from genassym.c, and include assym.s in bcopy_page.S,
cognet [Thu, 6 Oct 2005 11:26:37 +0000 (11:26 +0000)]
Export PAGE_SIZE from genassym.c, and include assym.s in bcopy_page.S,
instead of <machine/param.h>.

18 years agoAdd boot.nfsroot.options loader tunable.
pjd [Thu, 6 Oct 2005 11:18:34 +0000 (11:18 +0000)]
Add boot.nfsroot.options loader tunable.
It allows to specify options for NFS root file system.
Currently supported options are: soft, intr, conn, lockd.

I'm adding this functionality mostly for 'lockd' option, which is only
honored when performing the initial mount and will be silently ignored
if used while updating the mount options.

This will allow to use flock(2) without the need of using varmfs or
rpc.lockd and friends.

Example of use:
boot.nfsroot.options="intr,lockd"

MFC after: 2 weeks

18 years agoAdd strtok() and strtok_r() function to libkern.
pjd [Thu, 6 Oct 2005 11:10:09 +0000 (11:10 +0000)]
Add strtok() and strtok_r() function to libkern.

MFC after: 2 weeks

18 years agoImprove realism of benchmark httpd: return some HTTP headers as part
rwatson [Thu, 6 Oct 2005 10:28:31 +0000 (10:28 +0000)]
Improve realism of benchmark httpd: return some HTTP headers as part
of the sendfile() system call.

18 years agoCompile with -DHAVE_LSTAT since, for whatever reason, the configure script
tjr [Thu, 6 Oct 2005 09:49:37 +0000 (09:49 +0000)]
Compile with -DHAVE_LSTAT since, for whatever reason, the configure script
shipped with GNU cpio 2.6 fails to test for it.

18 years agoAdd basic simplified HTTP benchmark tools to the netrate suite:
rwatson [Thu, 6 Oct 2005 08:41:08 +0000 (08:41 +0000)]
Add basic simplified HTTP benchmark tools to the netrate suite:

- http is a lightweight, multithreaded HTTP query tool, which performs
  a timed measurement of the rate at which it can download files using
  single-fetch HTTP/1.0.  Other than specifying the IP and a URL path,
  it requires zero configuration.

- httpd is a lightweight, multithreaded HTTP server tool, which exports
  a single file of choice to the HTTP client, and responds with it no
  matter what the request.  Other than specifying the file to export,
  it requires zero configuration.

The goal of these tools is to measure the network costs associated with
HTTP serving, rather than file system, HTTP protocol parsing, error
handling, etc, and as such, parts relating to less interesting components
of HTTP testing are intentionally omitted.  Both are linked against
libpthread by default.

18 years agoFix a nasty typo. Change:
pjd [Thu, 6 Oct 2005 08:30:40 +0000 (08:30 +0000)]
Fix a nasty typo. Change:
if (foo);
bar();
to:
if (foo)
bar();
Really, really nasty bug and a very nice catch of mine.

Unfortunately, I'll not become a hero of the day, because the code is
commented out.

18 years agoFixing a boot time panic(when if_fwip is compiled into kernel) by renaming
avatar [Thu, 6 Oct 2005 07:09:34 +0000 (07:09 +0000)]
Fixing a boot time panic(when if_fwip is compiled into kernel) by renaming
module name to something that wouldn't conflict with
sys/dev/firewire/firewire.c.

Submitted by: Cai, Quanqing <caiquanqing at gmail dot com>
PR: kern/82727
MFC after: 3 days

18 years agoFix KASSERT function name in ether_output, use __func__ while I am here.
thompsa [Thu, 6 Oct 2005 01:21:40 +0000 (01:21 +0000)]
Fix KASSERT function name in ether_output, use __func__ while I am here.

18 years agoMake param.h includable again from assembler.
imp [Wed, 5 Oct 2005 23:36:19 +0000 (23:36 +0000)]
Make param.h includable again from assembler.

18 years agoUn-break handling of -t 0 which was broken in my previous commit.
csjp [Wed, 5 Oct 2005 22:02:07 +0000 (22:02 +0000)]
Un-break handling of -t 0 which was broken in my previous commit.
Add a flags argument to wait_for_lock so that O_NONBLOCK can be
passed to open if a user doesn't want the open to sleep until the
lock becomes available.

Submitted by: Amir Shalem (partially modified)

18 years agoInclude forgotten rtl80x9 file for ed.
imp [Wed, 5 Oct 2005 21:56:27 +0000 (21:56 +0000)]
Include forgotten rtl80x9 file for ed.

18 years ago- Locking improvements.
netchild [Wed, 5 Oct 2005 20:05:52 +0000 (20:05 +0000)]
- Locking improvements.
- Don't keep the SPDIF state in the driver private struct since it
  can be overriden by hand with pciconf(8), query it when needed instead.

Regarding the locking I let Ariff explain it himself:
---snip---
About the locking, that is what I'm intended to do since the beginning.
The reason I'm not putting that along since my first patchset was
because several people especially from amd46 camp reported that it cause
lots of LORs, which is weird considering that I've never encounter such
in a pretty much strict locking environment (i386). However, since our
previous discussion with Pyun YongHyeon about strict locking, I've
decided to bring it back for all the affected drivers, not just for
es137x. It turns out that the root of the problem was within dsp.c
during device open, which has been fixed since dsp.c revision 1.84.
---snip---

Submitted by: Ariff Abdullah <skywizard@MyBSD.org.my>

18 years agoAdd a comment regarding problems with NForce 2 mainboards and add disabled
netchild [Wed, 5 Oct 2005 20:00:12 +0000 (20:00 +0000)]
Add a comment regarding problems with NForce 2 mainboards and add disabled
code which may help.

People with a ich compatible soundcard which want to help out should
change the "#if 1" to a "#if 0" and try if the soundcard still works.
Reports about working or not-working soundcards with this change to
multimedia@ please.

PR: 73987

18 years agoUpdate this manpage:
jhb [Wed, 5 Oct 2005 19:48:21 +0000 (19:48 +0000)]
Update this manpage:
- Remove references to cpu_critical_*() as they no longer exist.
- Explain that any preemptions that occur during a critical section are
  deferred until the current thread exits the section.
- Remove a bogus example usage of a critical section.
- Note that one can interlock critical sections with spin mutexes in
  certain situations.

MFC after: 3 days

18 years agoFix long standing race condition associated with how lockf uses open(2)
csjp [Wed, 5 Oct 2005 17:39:15 +0000 (17:39 +0000)]
Fix long standing race condition associated with how lockf uses open(2)
for mutual exclusion:

A brief description of the problem:

1) Proc A picks up non-blocking lock on file X
2) Proc B attempts to pickup lock, fails then waits
3) Proc C attempts to pickup lock, fails then waits
4) Proc A releases lock
5) Proc B acquires lock, release it to pickup a non-blocking version
6) Proc C acquires lock, release it to pickup a non-blocking version
7) Both process B and C race each other to pickup lock again

This occurs mainly because the processes do not keep the lock after they have
been waiting on it. They drop it, attempt to re-acquire it. (They use the wait
to notify when the lock has become available then race to pick it up). This
results in additional CPU utilization during the race, and can also result
in processes picking locks up out of order.

This change attempts to correct this problem by eliminating the test/acquire
race and having the operating system handle it.

Reported by: kris
Tested by: kris
MFC after: 1 week

18 years agoDon't use the builtin vaalist for icc.
netchild [Wed, 5 Oct 2005 17:21:09 +0000 (17:21 +0000)]
Don't use the builtin vaalist for icc.

Submitted by: Igor Sysoev <is@rambler-co.ru>
MFC after: 3 days

18 years agoThis commit was generated by cvs2svn to compensate for changes in r150974,
harti [Wed, 5 Oct 2005 15:19:56 +0000 (15:19 +0000)]
This commit was generated by cvs2svn to compensate for changes in r150974,
which included commits to RCS files with non-trunk default branches.

18 years agoVendor fix for the build problem of snmp_pf. Move the fallback definitions
harti [Wed, 5 Oct 2005 15:19:56 +0000 (15:19 +0000)]
Vendor fix for the build problem of snmp_pf. Move the fallback definitions
for U?INT32_{MAX,MIN} from asn1.h into the .c files that actually require
them (the .h file doesn't refer to these macros).

18 years agoAdd simple TCP connect and TCP receive benchmark components, intended to
rwatson [Wed, 5 Oct 2005 12:10:35 +0000 (12:10 +0000)]
Add simple TCP connect and TCP receive benchmark components, intended to
measure the rate of TCP connection round trips supported by a host at
the socket layer.

18 years ago- Don't pollute opt_global.h with DEVICE_POLLING and introduce
glebius [Wed, 5 Oct 2005 10:09:17 +0000 (10:09 +0000)]
- Don't pollute opt_global.h with DEVICE_POLLING and introduce
  opt_device_polling.h
- Include opt_device_polling.h into appropriate files.
- Embrace with HAVE_KERNEL_OPTION_HEADERS the include in the files that
  can be compiled as loadable modules.

Reviewed by: bde

18 years ago- Don't include opt_global.h, it is always included implicitly.
glebius [Wed, 5 Oct 2005 10:07:27 +0000 (10:07 +0000)]
- Don't include opt_global.h, it is always included implicitly.
- Include opt_device_polling.h

18 years agoDefine HAVE_KERNEL_OPTION_HEADERS when building kernel and when building
glebius [Wed, 5 Oct 2005 10:05:55 +0000 (10:05 +0000)]
Define HAVE_KERNEL_OPTION_HEADERS when building kernel and when building
modules along with kernel.

After this change it is possible to embrace opt_*.h includes with ifdef
HAVE_KERNEL_OPTION_HEADERS. And thus, avoid editing a lot of Makefiles
in modules directory each time we introduce a new opt_xxx.h.

Requested by: bde

18 years agostop RFC 4193 address on the outside interface.
ume [Wed, 5 Oct 2005 07:00:42 +0000 (07:00 +0000)]
stop RFC 4193 address on the outside interface.

MFC after: 1 day

18 years agoNote added support for Tamarack TC5229J, Axiom and Dlink parts. Bump date.
imp [Wed, 5 Oct 2005 05:41:02 +0000 (05:41 +0000)]
Note added support for Tamarack TC5229J, Axiom and Dlink parts.  Bump date.

18 years agoAdd if_ed_rtl80x9.c
imp [Wed, 5 Oct 2005 05:26:03 +0000 (05:26 +0000)]
Add if_ed_rtl80x9.c

18 years agoRemove debug that crept in..
imp [Wed, 5 Oct 2005 05:24:35 +0000 (05:24 +0000)]
Remove debug that crept in..

18 years agoMFp4:
imp [Wed, 5 Oct 2005 05:21:07 +0000 (05:21 +0000)]
MFp4:
o Add support for Tamarack TC5299J + MII found on SMC 8041TX V.2
  and corega PCCCCTXD
o Add support for ISA/PCI RTL80[12]9 chips
o Improve support for the ax88790 based
o minor code movement

Submitted by: (#2) David Madole

18 years agoAdd regression tests for trimdomain(3).
brooks [Wed, 5 Oct 2005 04:46:10 +0000 (04:46 +0000)]
Add regression tests for trimdomain(3).

18 years agoWhen removing the local domain, only do so when the result will be a
brooks [Wed, 5 Oct 2005 04:42:20 +0000 (04:42 +0000)]
When removing the local domain, only do so when the result will be a
host name.  This is matches the documented behaviro.  The previous
behavior would remove the domain name even if the result retained a dot.

This fixes rsh connections from a.example.com to example.com.

Reviewed by: ceri (at least the concept)

18 years agoDon't set segment registers via ptrace yet. Its not ready.
peter [Tue, 4 Oct 2005 23:26:00 +0000 (23:26 +0000)]
Don't set segment registers via ptrace yet.  Its not ready.

18 years agoWhen data passed into devctl_notify is NULL, don't print (null). Instead
imp [Tue, 4 Oct 2005 22:25:14 +0000 (22:25 +0000)]
When data passed into devctl_notify is NULL, don't print (null).  Instead
don't print anything at all.

# this fixes a problem that I noticed with devd.pipe not terminating lines
# with \n correctly sometimes.

18 years agomedia-type predicate is used in contexts where device-name is undefined.
imp [Tue, 4 Oct 2005 22:22:51 +0000 (22:22 +0000)]
media-type predicate is used in contexts where device-name is undefined.
In those contexted, use subsystem instead.

# This causes dhclient to run again when I plug in my ethernet cable to
# my fxp card in my laptop.

18 years agoRemove an unused variable.
stefanf [Tue, 4 Oct 2005 22:00:35 +0000 (22:00 +0000)]
Remove an unused variable.

Reviewed by: ken

18 years agoMerge makelist rev 1.10 and map.c rev 1.22 from NetBSD. They just patch the
stefanf [Tue, 4 Oct 2005 21:59:29 +0000 (21:59 +0000)]
Merge makelist rev 1.10 and map.c rev 1.22 from NetBSD.  They just patch the
bug fixed in the last commit to map.c in a different way.  Follow NetBSD to
facilitate future merges.

18 years agoMerge NetBSD's rev. 1.49:
stefanf [Tue, 4 Oct 2005 21:51:26 +0000 (21:51 +0000)]
Merge NetBSD's rev. 1.49:

Fix double if (from Alexey E. Suslikov via jmc@openbsd).
While here, re-word both H_[GS]ETUNIQUE descriptions so they make
more sense. Bump date.

18 years agoMerge NetBSD's rev. 1.41:
stefanf [Tue, 4 Oct 2005 21:45:42 +0000 (21:45 +0000)]
Merge NetBSD's rev. 1.41:

PR/31012: Barry Naujok: libedit el_get with EL_EDITOR op does not work
Fixed as suggested.

18 years agoRemove a never reached RET.
cognet [Tue, 4 Oct 2005 20:47:27 +0000 (20:47 +0000)]
Remove a never reached RET.

18 years agostrd needs the destination to be double-word aligned, but the pointer passed
cognet [Tue, 4 Oct 2005 20:42:42 +0000 (20:42 +0000)]
strd needs the destination to be double-word aligned, but the pointer passed
to savectx isn't always, so always use stmia, savectx isn't called enough
to need that kind of optimization.

18 years agoWhen bridging is enabled and an ARP request is recieved on a member interface,
thompsa [Tue, 4 Oct 2005 19:50:02 +0000 (19:50 +0000)]
When bridging is enabled and an ARP request is recieved on a member interface,
the arp code will search all local interfaces for a match. This triggers a
kernel log if the bridge has been assigned an address.

arp: ac:de:48:18:83:3d is using my IP address 192.168.0.142!

bridge0: flags=8041<UP,RUNNING,MULTICAST> mtu 1500
        inet 192.168.0.142 netmask 0xffffff00
        ether ac:de:48:18:83:3d

Silence this warning for 6.0 to stop unnecessary bug reports, the code will need
to be reworked.

Approved by: mlaier (mentor)
MFC after: 3 days

18 years agoCorrect brainfart in SO_BINTIME test.
andre [Tue, 4 Oct 2005 18:19:21 +0000 (18:19 +0000)]
Correct brainfart in SO_BINTIME test.

Pointed out by: nate
Pointy hat to: andre

18 years agoMake SO_BINTIME timestamps available on raw_ip sockets.
andre [Tue, 4 Oct 2005 18:07:11 +0000 (18:07 +0000)]
Make SO_BINTIME timestamps available on raw_ip sockets.

Sponsored by: TCP/IP Optimization Fundraise 2005

18 years agoRe-order MAC and DAC checks in shmget() in order to give precedence to
rwatson [Tue, 4 Oct 2005 16:40:20 +0000 (16:40 +0000)]
Re-order MAC and DAC checks in shmget() in order to give precedence to
the MAC result, as well as avoid losing the DAC check result when MAC
is enabled.

MFC after: 3 days
Reported by: Patrick LeBlanc <Patrick dot LeBlanc at sparta dot com>

18 years agodump_avail has nothing to do with ARM_USE_SMALL_ALLOC, so move its
cognet [Tue, 4 Oct 2005 16:29:31 +0000 (16:29 +0000)]
dump_avail has nothing to do with ARM_USE_SMALL_ALLOC, so move its
declaration out of the #ifdef.