]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoadd witty remark about serious thought.
wilko [Mon, 21 Nov 2005 21:42:43 +0000 (21:42 +0000)]
add witty remark about serious thought.

MFC after: 2 days

18 years agoTurn PUC_FASTINTR back off on by default on sparc64 since it breaks with
jhb [Mon, 21 Nov 2005 21:40:33 +0000 (21:40 +0000)]
Turn PUC_FASTINTR back off on by default on sparc64 since it breaks with
the built-in serial ports on the ultra60 and e4500.

In collusion with: kris

18 years agoTeach schedgraph how to parse KTR_CRITICAL records. critical_enter/exit
scottl [Mon, 21 Nov 2005 21:27:40 +0000 (21:27 +0000)]
Teach schedgraph how to parse KTR_CRITICAL records.  critical_enter/exit
events are now plotted as a counting graph, similar to CPU load, so that
their duration and critnest values can be visualized.

18 years agoDon't enable PUC_FASTINTR by default in the source. Instead, enable it
jhb [Mon, 21 Nov 2005 20:22:35 +0000 (20:22 +0000)]
Don't enable PUC_FASTINTR by default in the source.  Instead, enable it
via the DEFAULTS kernel configs.  This allows folks to turn it that option
off in the kernel configs if desired without having to hack the source.
This is especially useful since PUC_FASTINTR hangs the kernel boot on my
ultra60 which has two uart(4) devices hung off of a puc(4) device.

I did not enable PUC_FASTINTR by default on powerpc since powerpc does not
currently allow sharing of INTR_FAST with non-INTR_FAST like the other
archs.

18 years agoCreate DEFAULTS files for alpha, ia64, powerpc, and sparc64 and move
jhb [Mon, 21 Nov 2005 20:17:46 +0000 (20:17 +0000)]
Create DEFAULTS files for alpha, ia64, powerpc, and sparc64 and move
'device mem' over from GENERIC to DEFAULTS to be consistent with i386 and
amd64.  Additionally, on ia64 enable ACPI by default since ia64 requires
acpi.

18 years agoPull up sys/modules/acpi/acpi/Makefile,v 1.10 change by iedowse@.
ru [Mon, 21 Nov 2005 20:11:39 +0000 (20:11 +0000)]
Pull up sys/modules/acpi/acpi/Makefile,v 1.10 change by iedowse@.
This should fix another parallel make breakage, reported by pjd@.

18 years agoFix for a bug where NFS/TCP would not reconnect (in the case where
ps [Mon, 21 Nov 2005 19:25:24 +0000 (19:25 +0000)]
Fix for a bug where NFS/TCP would not reconnect (in the case where
the server FIN'ed). Seen with Solaris NFS servers.

Reported by: TOMITA Yoshinori <yoshint@flab.fujitsu.co.jp>
Submitted by: Mohan Strinivasan

18 years ago- Always return success from NFS strategy. nfs_doio(), in the
ps [Mon, 21 Nov 2005 19:23:46 +0000 (19:23 +0000)]
- Always return success from NFS strategy. nfs_doio(), in the
  event of an error, does the right thing, in terms of setting
  the error flags in the buf header. That fixes a crash from
  bstrategy().
- Treat ETIMEDOUT as a "recoverable" error, causing the buffer
  to be re-dirtied. ETIMEDOUT can occur on soft mounts, when
  the number of retries are exceeded, and we don't want data loss
  in that case.

Submitted by: Mohan Srinivasan

18 years agoFix for a bug that causes SACK scoreboard corruption when the limit
ps [Mon, 21 Nov 2005 19:22:10 +0000 (19:22 +0000)]
Fix for a bug that causes SACK scoreboard corruption when the limit
on holes per connection is reached.

Reported by: Patrik Roos
Submitted by: Mohan Srinivasan
Reviewed by: Raja Mukerji, Noritoshi Demizu

18 years agoForce pmap to write-back the pte cacheline after each pte modification,
cognet [Mon, 21 Nov 2005 19:10:44 +0000 (19:10 +0000)]
Force pmap to write-back the pte cacheline after each pte modification,
even if the pte is supposed to be cached in write through mode (might be a
skyeye bug, I'll have to check).

18 years agoAdd an alternate ID for the arm920t (the real solution is to have
cognet [Mon, 21 Nov 2005 19:06:25 +0000 (19:06 +0000)]
Add an alternate ID for the arm920t (the real solution is to have
per-cpu class masks, but oh well).

18 years agofix a problem with XID re-use when a server returns NFSERR_JUKEBOX.
rees [Mon, 21 Nov 2005 18:39:18 +0000 (18:39 +0000)]
fix a problem with XID re-use when a server returns NFSERR_JUKEBOX.

Submitted by: cel@citi.umich.edu
Fixed by: rick@snowhite.cis.uoguelph.ca
Approved by: alfred
MFC after: 3 weeks

18 years agoExpand the hack to mask the atpics if 'device atpic' is not in the kernel
jhb [Mon, 21 Nov 2005 18:39:17 +0000 (18:39 +0000)]
Expand the hack to mask the atpics if 'device atpic' is not in the kernel
during boot up.  Now we do a full reset of the 8259As and setup a simple
interrupt handler (we actually borrow the apic one that just does an
immediate iret) to handle any spurious interrupts triggered by either chip.
This should fix some folks that were getting a Trap 30 during bootup of
certain SMP AMD systems.  This might get pushed into the 6.0 branch as an
errata.  For now a suitable workaround is to add 'device atpic' to your
kernel config.

Tested by: scottl
Helpful info from: dillon
MFC after: 1 week

18 years agoTidy up markup and fix two bugs.
ru [Mon, 21 Nov 2005 17:18:34 +0000 (17:18 +0000)]
Tidy up markup and fix two bugs.

18 years ago- Merge FreeBSD Configuration subsection etc. with SYNOPSIS.
ru [Mon, 21 Nov 2005 16:44:16 +0000 (16:44 +0000)]
- Merge FreeBSD Configuration subsection etc. with SYNOPSIS.
- Remove the description of how to build a module.
- Remove the description of how to patch the sources.
- Refer to the polling(4) manpage on how to enable the polling mode.
- Tidy up markup.

18 years agoFix mysterious build failures (with parallel make) early in
ru [Mon, 21 Nov 2005 14:41:10 +0000 (14:41 +0000)]
Fix mysterious build failures (with parallel make) early in
buildkernel: provide a real but dummy name to ${DEPENDFILE}
so that the relevant exists() check in bsd.prog.mk fails and
ensures that ${GENHDRS} are built before any other objects.

MFC after: 3 days

18 years agoMess up the "kernel" float trig function .c files with ifdefs so that
bde [Mon, 21 Nov 2005 04:57:12 +0000 (04:57 +0000)]
Mess up the "kernel" float trig function .c files with ifdefs so that
they can be #included in other .c files to give inline functions, and
use them to inline the functions in most callers (not in e_lgammaf_r.c).
__kernel_tanf() is too large and complicated for gcc to inline very well.

An athlons, this gives a speed increase under favourable pipeline
conditions of about 10% overall (larger for AXP, smaller for A64).
E.g., on AXP, sinf() on uniformly distributed args in [-2Pi, 2Pi]
now takes 30-56 cycles; it used to take 45-61 cycles; hardware fsin
takes 65-129.

18 years agoCreate a device node in /dev when a USB keyboard is plugged in.
arun [Mon, 21 Nov 2005 04:47:46 +0000 (04:47 +0000)]
Create a device node in /dev when a USB keyboard is plugged in.

Reviewed by: grehan

18 years agobusdma cleanup for em(4).
yongari [Mon, 21 Nov 2005 04:17:43 +0000 (04:17 +0000)]
busdma cleanup for em(4).
 - don't force busdma to pre-allocate bounce pages for parent tag.
 - use system supplied roundup2 macro instead of rolling its own version.
 - TX/RX decriptor length should be multiple of 128. There is no
   no need to expand the size with the multiple of 4096.
 - don't create/destroy DMA maps in TX/RX handlers. Use pre-allocated
   DMA maps. Since creating DMA maps on sparc64 is time consuming
   operations(resource mananger overhead), this change should boost
   performance on sparc64. I could get > 2x speedup on Ultra60.
 - TX/RX descriptors could be aligned on 128 boundary. Aligning them
   on PAGE_SIZE is waste of resource.
 - don't blindly create TX DMA tag with size of MCLBYTES * 8. The size
   is only valid under jumbo frame environments. Instead of using the
   hardcoded value, re-compute necessary size on the fly.
 - RX side bus_dmamap_load_mbuf_sg(9) support.
 - remove unused macro EM_ROUNDUP and constant EM_MMBA.

Reviewed by: scottl
Tested by: glebius

18 years agoAdd a hack to ignore PCR bit for 6300ESB, 82801[D-G]B chips. It seems
yongari [Mon, 21 Nov 2005 03:37:43 +0000 (03:37 +0000)]
Add a hack to ignore PCR bit for 6300ESB, 82801[D-G]B chips. It seems
that enabling busmastering would result in PCR bit ON after codec
reset.
While I'm here add DELAY(1) to codec access routine to give reasonable
time to codec operation. Without the delay, it would cause problems on
super-fast machines(> 2GHz). Also enable legacy audio for all 6300ESB,
82801[D-G]B chips. Previously, it enabled legacy audio for 82801DB(ICH4)
chip only.

Reported by:    Maxim Maximov mcsi AT mcsi DOT pp DOT ru
Andrew Bliznak andriko.b AT gmail DOT com
Tested by: brueffer, Maxim Maximov, Andrew Bliznak

18 years agoUse double precision to simplify and optimize a long division.
bde [Mon, 21 Nov 2005 00:38:21 +0000 (00:38 +0000)]
Use double precision to simplify and optimize a long division.

On athlons, this gives a speedup of 10-20% for tanf() on uniformly
distributed args in [-2Pi, 2Pi].  (It only directly applies for 43%
of the args and gives a 16-20% speedup for these (more for AXP than
A64) and this gives an overall speedup of 10-12% which is all that it
should; however, it gives an overall speedup of 17-20% with gcc-3.3
on AXP-A64 by mysteriously effected cases where it isn't executed.)

I originally intended to use double precision for all internals of
float trig functions and will probably still do this, but benchmarking
showed that converting to double precision and back is a pessimization
in cases where a simple float precision calculation works, so it may
be optimal to switch precisions only when using extra precision is
much simpler.

18 years agoRestored a cleanup in rev.1.9 tthat was lost in rev.1.10.
bde [Sun, 20 Nov 2005 20:17:04 +0000 (20:17 +0000)]
Restored a cleanup in rev.1.9 tthat was lost in rev.1.10.

18 years agoIf export mount flag is not passed in, set default parameters
rodrigc [Sun, 20 Nov 2005 17:04:50 +0000 (17:04 +0000)]
If export mount flag is not passed in, set default parameters
for export structure and pass that to vfs_export().
Currently in userland mount(8), an export structure is unconditionally
passed in, only for UFS.  This is an attempt to move that UFS-specific
behavior out of mount(8) and into the UFS filesystem code.

18 years agoInclude ip_options.h for IPX-IP encapsulation.
andre [Sun, 20 Nov 2005 16:17:12 +0000 (16:17 +0000)]
Include ip_options.h for IPX-IP encapsulation.

Noticed by: Tinderbox
Sponsored by:   TCP/IP Optimization Fundraise 2005

18 years agoUse memcpy/memset consistently accross ipw and iwi instead of bcopy/bzero.
damien [Sun, 20 Nov 2005 16:13:00 +0000 (16:13 +0000)]
Use memcpy/memset consistently accross ipw and iwi instead of bcopy/bzero.

18 years agoDon't use /etc/firmware. /etc is for configuration files only.
damien [Sun, 20 Nov 2005 16:02:04 +0000 (16:02 +0000)]
Don't use /etc/firmware.  /etc is for configuration files only.
Use /boot to store firmware files instead.

Requested by: Daniel O'Connor, Scott Long

18 years agoUse the appropriate error function for displaying the error,
dds [Sun, 20 Nov 2005 13:48:15 +0000 (13:48 +0000)]
Use the appropriate error function for displaying the error,
instead of printing it to stdout.

MFC after: 1 week

18 years agoWhitespace.
le [Sun, 20 Nov 2005 12:14:18 +0000 (12:14 +0000)]
Whitespace.

18 years agoAlways declare variables at the start of the function.
le [Sun, 20 Nov 2005 12:12:31 +0000 (12:12 +0000)]
Always declare variables at the start of the function.
Don't allocate potentially large variables on the stack.
Check strsep() return values when the string comes from userland.
Shorten variable names for lucidity's sake.

most of the stuff:
Pointed out by:    njl@

18 years agoFix whitespace issue.
le [Sun, 20 Nov 2005 10:40:06 +0000 (10:40 +0000)]
Fix whitespace issue.

Pointed out by:   joel@

18 years agoFix whitespace issues.
le [Sun, 20 Nov 2005 10:35:46 +0000 (10:35 +0000)]
Fix whitespace issues.

Pointed out by:    joel@

18 years agoEliminate pmap_init2(). It's no longer used.
alc [Sun, 20 Nov 2005 06:09:49 +0000 (06:09 +0000)]
Eliminate pmap_init2().  It's no longer used.

18 years agoFix compile on 64-bit platforms.
scottl [Sun, 20 Nov 2005 04:27:24 +0000 (04:27 +0000)]
Fix compile on 64-bit platforms.

18 years agoImprove inittodr(). Assume the real-time clock is reliable and only
marcel [Sun, 20 Nov 2005 01:31:29 +0000 (01:31 +0000)]
Improve inittodr(). Assume the real-time clock is reliable and only
use the base time in case the real-time clock is bogus or behind the
base time. Most importantly, don't sanity-check the base time up front
because it may be zero. This is not a preposterous condition. It just
means that none of the file systems have their mount time updated.

MFC after: 1 week

18 years agoCorrect the API for Windows interupt handling a little. The prototype
wpaul [Sun, 20 Nov 2005 01:29:29 +0000 (01:29 +0000)]
Correct the API for Windows interupt handling a little. The prototype
for a Windows ISR is 'BOOLEAN isrfunc(KINTERRUPT *, void *)' meaning
the ISR get a pointer to the interrupt object and a context pointer,
and returns TRUE if the ISR determines the interrupt was really generated
by the associated device, or FALSE if not.

I had mistakenly used 'void isrfunc(void *)' instead. It happens the
only thing this affects is the internal ndis_intr() ISR in subr_ndis.c,
but it should be fixed just in case we ever need to register a real
Windows ISR vi IoConnectInterrupt().

For NDIS miniports that provide a MiniportISR() method, the 'is_our_intr'
value returned by the method serves as the return value from ndis_isr(),
and 'call_isr' is used to decide whether or not to schedule the interrupt
handler via DPC. For drivers that only supply MiniportEnableInterrupt()
and MiniportDisableInterrupt() methods, call_isr is always TRUE and
is_our_intr is always FALSE.

In the end, there should be no functional changes, except that now
ntoskrnl_intr() can terminate early once it finds the ISR that wants
to service the interrupt.

18 years agoAn empty file does not have a positive number of lines.
cperciva [Sun, 20 Nov 2005 00:50:30 +0000 (00:50 +0000)]
An empty file does not have a positive number of lines.

Make sure that the number of lines read is non-zero before in order to
avoid dumping core.

Reported by: Wojciech A. Koszek
Pointy hat to: cperciva

18 years agoAdd more options to ffs_opts, so that vfs_filteropts() will not
rodrigc [Sat, 19 Nov 2005 23:28:19 +0000 (23:28 +0000)]
Add more options to ffs_opts, so that vfs_filteropts() will not
complain when we pass these options to a UFS filesystem as strings
via nmount():  noexec, nosuid, nosymfollow, sync, suiddir

18 years agoReturn 0 if we are a network card and do match. Previously, we'd bogusly
imp [Sat, 19 Nov 2005 23:26:57 +0000 (23:26 +0000)]
Return 0 if we are a network card and do match.  Previously, we'd bogusly
fail and the card wouldn't be detected.

Submitted by: Bryan Blackburn

18 years agoFix bug introduced in revision 1.186:
marcel [Sat, 19 Nov 2005 21:51:45 +0000 (21:51 +0000)]
Fix bug introduced in revision 1.186:
  When all file systems have a time stamp of zero, which is the case
for example when the root file system is on a read-only medium, we
ended up not calling inittodr() at all.  A potential uncleanliness
existed as well. If multiple file systems had a non-zero time stamp,
we would call inittodr() multiple times. While this should not be
harmful, it's definitely not ideal.
Fix both issues by iterating over the mounted file systems to find
the largest time stamp and call inittodr() exactly once with that
time stamp. This could of course be a zero time stamp if none of the
mounted file systems have a non-zero time stamp. In that case the
annoying errors mentioned in the commit log for revision 1.186 still
haven't been avoided. The bottom line is that inittodr() should not
complain when it gets a time base of zero. At the time of this
commit only alpha seems to have that problem.

Reported by: Dario Freni (saturnero at freesbie dot org)
MFC after: 1 week

18 years agoParse more mount options in vfs_donmount(), before vfs_domount()
rodrigc [Sat, 19 Nov 2005 21:22:21 +0000 (21:22 +0000)]
Parse more mount options in vfs_donmount(), before vfs_domount()
is called.  It looks like there are lots of different mount flags checked
in vfs_domount(), so we need to do the parsing for these particular
mount flags earlier on.  The new flags parsed are:
async, force, multilabel, noasync, noatime, noclusterr, noclusterw,
noexec, nosuid, nosymfollow, snapshot, suiddir, sync, union.

Existing code which uses mount() to mount UFS filesystems is not
affected, but new code which uses nmount() to mount UFS filesystems
should behave better.

18 years agoFinally bring in what was produced during Google SoC 2005:
le [Sat, 19 Nov 2005 20:26:52 +0000 (20:26 +0000)]
Finally bring in what was produced during Google SoC 2005:

Add functions to rename objects and to move a subdisk from one drive
to another.

Add manual page (finally).

Bring up-to-date the online help.

Obtained from:  Chris Jones <chris.jones@ualberta.ca>
Sponsored by:   Google Summer of Code 2005
MFC in:         1 week

18 years agoFinally bring in what was produced during Google SoC 2005:
le [Sat, 19 Nov 2005 20:25:18 +0000 (20:25 +0000)]
Finally bring in what was produced during Google SoC 2005:

Add functions to rename objects and to move a subdisk from one drive
to another.

Obtained from:  Chris Jones <chris.jones@ualberta.ca>
Sponsored by:   Google Summer of Code 2005
MFC in:         1 week

18 years agoRemove references to iwicontrol.
damien [Sat, 19 Nov 2005 17:26:54 +0000 (17:26 +0000)]
Remove references to iwicontrol.
Firmware is now loaded by the driver itself.

Remove references to wicontrol.
wicontrol should not be used with iwi.

18 years agoRemove 'ipprintfs' which were protected under DIAGNOSTIC. It doesn't
andre [Sat, 19 Nov 2005 17:04:52 +0000 (17:04 +0000)]
Remove 'ipprintfs' which were protected under DIAGNOSTIC.  It doesn't
have any know to enable it from userland and could only be enabled by
either setting it to 1 at compile time or through the kernel debugger.

In the future it may be brought back as KTR tracing points.

Discussed with: rwatson
Sponsored by: TCP/IP Optimization Fundraise 2005

18 years agoLoad firmware images directly from the filesystem (looks into /etc/firmware
damien [Sat, 19 Nov 2005 16:54:55 +0000 (16:54 +0000)]
Load firmware images directly from the filesystem (looks into /etc/firmware
directory by default) without requiring the user to load them by hand using
e.g iwicontrol.  Get rid of the old ioctl crud.
Updated iwi-firmware port coming soon.

Obtained from: OpenBSD

18 years agoProperly parse the nowin95 mount option.
rodrigc [Sat, 19 Nov 2005 16:38:39 +0000 (16:38 +0000)]
Properly parse the nowin95 mount option.

Tested by: Rainer Hurling <rhurlin at gwdg dot de>

18 years agoMinor tweaks.
damien [Sat, 19 Nov 2005 15:08:05 +0000 (15:08 +0000)]
Minor tweaks.

18 years agoMove MAX_IPOPTLEN and struct ipoption back into ip_var.h as
andre [Sat, 19 Nov 2005 14:01:32 +0000 (14:01 +0000)]
Move MAX_IPOPTLEN and struct ipoption back into ip_var.h as
userland programs depend on it.

Pointed out by: le
Sponsored by: TCP/IP Optimization Fundraise 2005

18 years ago- Move the documentation for the ENABLE_WPA_SUPPLICANT_EAPOL knob to into
jkoshy [Sat, 19 Nov 2005 12:21:11 +0000 (12:21 +0000)]
- Move the documentation for the ENABLE_WPA_SUPPLICANT_EAPOL knob to into
  the list for 'world' builds.
- Increase the width of a bullet list.
- Use .Ss to name sub-sections of this file.

18 years agoDo not explicitly state how many bytes an argument list can be in the
simon [Sat, 19 Nov 2005 11:30:55 +0000 (11:30 +0000)]
Do not explicitly state how many bytes an argument list can be in the
description of E2BIG, since it's now larger on some platforms.

MFC after: 3 days

18 years agoRevert last revision by phk@, it's redundant since bsd.incs.mk
ru [Sat, 19 Nov 2005 07:04:17 +0000 (07:04 +0000)]
Revert last revision by phk@, it's redundant since bsd.incs.mk
already handles this, FWIW.

18 years agoAdd the NO_INCS knob to bsd.prog.mk and bsd.lib.mk to not include
ru [Sat, 19 Nov 2005 06:45:44 +0000 (06:45 +0000)]
Add the NO_INCS knob to bsd.prog.mk and bsd.lib.mk to not include
bsd.incs.mk, and use it when installing 32-bit compat libraries
on amd64.  This causes it to *not* overwrite native headers with
i386 versions, which was the case with <fenv.h> and <vgl.h>.

PR: amd64/83806
Prodded by: bde
MFC after: 1 week

18 years agoo Include <sys/time.h>
marcel [Sat, 19 Nov 2005 04:47:06 +0000 (04:47 +0000)]
o  Include <sys/time.h>
o  Make this ILP32/LP64 clean: cast pointers to long
o  Code conditional upon DEBUG must also be conditional
   upon _LIBC_R_

18 years agoo Include <string.h>
marcel [Sat, 19 Nov 2005 04:45:15 +0000 (04:45 +0000)]
o  Include <string.h>
o  Make this ILP32/LP64 clean: cast pointers to long.

18 years agoFix typo: s/_LIBC_R/_LIBC_R_/
marcel [Sat, 19 Nov 2005 04:43:29 +0000 (04:43 +0000)]
Fix typo: s/_LIBC_R/_LIBC_R_/

18 years agoMoved all the optimizations for |x| <= 9pi/2 from
bde [Sat, 19 Nov 2005 02:38:27 +0000 (02:38 +0000)]
Moved all the optimizations for |x| <= 9pi/2 from
__ieee754_rem_pio2f() to its 3 callers and manually inline them.

On Athlons, with favourable compiler flags and optimizations and
favourable pipeline conditions, this gives a speedup of 30-40 cycles
for cosf(), sinf() and tanf() on the range pi/4 < |x| <= 9pi/4, so
thes functions are now signifcantly faster than the hardware trig
functions in many cases.  E.g., in a benchmark with uniformly distributed
x in [-2pi, 2pi], A64 hardware fcos took 72-129 cycles and cosf() took
37-55 cycles.  Out-of-order execution is needed to get both of these
times.  The optimizations in this commit apparently work more by
removing 1 serialization point than by reducing latency.

18 years agoAdd "shortnames" and "longnames" mount options which are
rodrigc [Fri, 18 Nov 2005 22:34:31 +0000 (22:34 +0000)]
Add "shortnames" and "longnames" mount options which are
synonyms for "shortname" and "longname" mount options.  The old
(before nmount()) mount_msdosfs program accepted "shortnames" and "longnames",
but the kernel nmount() checked for "shortname" and "longname".
So, make the kernel accept "shortnames", "longnames", "shortname", "longname"
for forwards and backwarsd compatibility.

Discovered by: Rainer Hurling <rhurlin at gwdg dot de>

18 years agoural now supports automatic rate adaptation in BSS mode.
damien [Fri, 18 Nov 2005 21:46:28 +0000 (21:46 +0000)]
ural now supports automatic rate adaptation in BSS mode.

18 years agoSecond part of the AMRR commit.
damien [Fri, 18 Nov 2005 21:37:02 +0000 (21:37 +0000)]
Second part of the AMRR commit.
Enable automatic rate adaptation in BSS operating mode.
Works great here.  Will need a lot of testing though.

18 years agoConsolidate all IP Options handling functions into ip_options.[ch] and
andre [Fri, 18 Nov 2005 20:12:40 +0000 (20:12 +0000)]
Consolidate all IP Options handling functions into ip_options.[ch] and
include ip_options.h into all files making use of IP Options functions.

From ip_input.c rev 1.306:
  ip_dooptions(struct mbuf *m, int pass)
  save_rte(m, option, dst)
  ip_srcroute(m0)
  ip_stripoptions(m, mopt)

From ip_output.c rev 1.249:
  ip_insertoptions(m, opt, phlen)
  ip_optcopy(ip, jp)
  ip_pcbopts(struct inpcb *inp, int optname, struct mbuf *m)

No functional changes in this commit.

Discussed with: rwatson
Sponsored by: TCP/IP Optimization Fundraise 2005

18 years agoAdd sanity checking for QUEUE(3) lists under INVARIANTS. Races may lead
emaste [Fri, 18 Nov 2005 19:41:55 +0000 (19:41 +0000)]
Add sanity checking for QUEUE(3) lists under INVARIANTS.  Races may lead
to list corruption, which can be difficult to unravel in a post-mortem
analysis.  These checks verify that prev and next pointers are consistent
when inserting or removing elements, thus catching any corruption earlier.

Also use TRASHIT to break LIST and SLIST link pointers on element removal,
from mlaier via -hackers.

Reviewed by: mlaier
Approved by: rwatson (mentor)

18 years agoUnifdef for FreeBSD.
ru [Fri, 18 Nov 2005 19:38:45 +0000 (19:38 +0000)]
Unifdef for FreeBSD.

18 years ago- Always print the trap number so that we have something to start with for
jhb [Fri, 18 Nov 2005 19:26:46 +0000 (19:26 +0000)]
- Always print the trap number so that we have something to start with for
  mystery traps.  If we don't have a message for a given trap, just use
  UNKNOWN for the message.
- Add trap messages for T_XMMFLT and T_RESERVED.

MFC after: 1 week

18 years agoDocument CLOCK_UPTIME which returns the current uptime in SI seconds.
andre [Fri, 18 Nov 2005 17:13:22 +0000 (17:13 +0000)]
Document CLOCK_UPTIME which returns the current uptime in SI seconds.
At the moment it is just an alias for CLOCK_MONOTONIC which reports
the same number.

Sponsored by: TCP/IP Optimization Fundraise 2005

18 years agoRemove references to MEXT_ADD_REF, MEXT_REM_REF and MEXT_IS_REF
andre [Fri, 18 Nov 2005 17:04:49 +0000 (17:04 +0000)]
Remove references to MEXT_ADD_REF, MEXT_REM_REF and MEXT_IS_REF
which were removed with rev. 1.179 of mbuf.h.

Sponsored by: TCP/IP Optimization Fundraise 2005

18 years agoAdd CLOCK_UPTIME to clock_gettime(2) reporting the current
andre [Fri, 18 Nov 2005 16:51:13 +0000 (16:51 +0000)]
Add CLOCK_UPTIME to clock_gettime(2) reporting the current
uptime measured in SI seconds.

Sponsored by: TCP/IP Optimization Fundraise 2005

18 years agoAdd support for a new/unreleased Pentium-M.
ps [Fri, 18 Nov 2005 16:47:24 +0000 (16:47 +0000)]
Add support for a new/unreleased Pentium-M.

Reviewed by: jkoshy

18 years agoPurge layer specific mbuf flags on layer crossings to avoid confusing
andre [Fri, 18 Nov 2005 16:23:26 +0000 (16:23 +0000)]
Purge layer specific mbuf flags on layer crossings to avoid confusing
upper or lower layers.

Sponsored by: TCP/IP Optimization Fundraise 2005

18 years agoRework icmp_error() to deal with truncated IP packets from
andre [Fri, 18 Nov 2005 14:48:42 +0000 (14:48 +0000)]
Rework icmp_error() to deal with truncated IP packets from
ip_forward() when doing extended quoting in error messages.

Sponsored by: TCP/IP Optimization Fundraise 2005

18 years agoIn ip_forward() copy as much into the temporary error mbuf as we
andre [Fri, 18 Nov 2005 14:44:48 +0000 (14:44 +0000)]
In ip_forward() copy as much into the temporary error mbuf as we
have free space in it.  Allocate correct mbuf from the beginning.
This allows icmp_error() to quote the entire TCP header in error
messages.

Sponsored by: TCP/IP Optimization Fundraise 2005

18 years agoAdd KASSERTs to M_ALIGN() and MH_ALIGN() to prevent usage on wrong
andre [Fri, 18 Nov 2005 14:40:43 +0000 (14:40 +0000)]
Add KASSERTs to M_ALIGN() and MH_ALIGN() to prevent usage on wrong
mbuf types.

Sponsored by: TCP/IP Optimization Fundraise 2005

18 years agoFix markup, grammar and spelling.
ru [Fri, 18 Nov 2005 14:21:28 +0000 (14:21 +0000)]
Fix markup, grammar and spelling.

18 years agoCross-reference hwpmc(4).
jkoshy [Fri, 18 Nov 2005 14:05:47 +0000 (14:05 +0000)]
Cross-reference hwpmc(4).

18 years agoUnbreak and fix markup.
ru [Fri, 18 Nov 2005 14:01:11 +0000 (14:01 +0000)]
Unbreak and fix markup.

18 years agoFix warning, sort sections.
ru [Fri, 18 Nov 2005 13:53:36 +0000 (13:53 +0000)]
Fix warning, sort sections.

18 years agoMinor markup tweaks.
ru [Fri, 18 Nov 2005 13:50:59 +0000 (13:50 +0000)]
Minor markup tweaks.

18 years agoMinimally fix this manpage to not emit warnings.
ru [Fri, 18 Nov 2005 13:44:44 +0000 (13:44 +0000)]
Minimally fix this manpage to not emit warnings.

18 years agoFix up markup.
ru [Fri, 18 Nov 2005 12:08:31 +0000 (12:08 +0000)]
Fix up markup.

18 years agoProvide a short description.
ru [Fri, 18 Nov 2005 12:01:14 +0000 (12:01 +0000)]
Provide a short description.

18 years agoFix up markup.
ru [Fri, 18 Nov 2005 11:54:14 +0000 (11:54 +0000)]
Fix up markup.

18 years agoFix up markup etc. in recently born manpage.
ru [Fri, 18 Nov 2005 11:53:23 +0000 (11:53 +0000)]
Fix up markup etc. in recently born manpage.

18 years ago-mdoc sweep.
ru [Fri, 18 Nov 2005 10:56:28 +0000 (10:56 +0000)]
-mdoc sweep.

18 years ago-mdoc sweep.
ru [Fri, 18 Nov 2005 10:36:29 +0000 (10:36 +0000)]
-mdoc sweep.

18 years ago- Add parsing for the following existing UFS/FFS mount options in the nmount()
rodrigc [Fri, 18 Nov 2005 06:06:10 +0000 (06:06 +0000)]
- Add parsing for the following existing UFS/FFS mount options in the nmount()
callpath via vfs_getopt(), and set the appropriate MNT_* flag:
  -> acls, async, force, multilabel, noasync, noatime,
  -> noclusterr, noclusterw, snapshot, update

- Allow errmsg as a valid mount option via vfs_getopt(),
  so we can later add a hook to propagate mount errors back
  to userspace via vfs_mount_error().

18 years agoRemoved an unused declaration which was so old that it wasn't a prototype
bde [Fri, 18 Nov 2005 05:03:12 +0000 (05:03 +0000)]
Removed an unused declaration which was so old that it wasn't a prototype
and thus just broke building at any nonzero WARNS level.

Fixed nearby style bugs.

18 years agoFix a bug that caused some /dev entries to continue to exist after
jdp [Fri, 18 Nov 2005 02:43:49 +0000 (02:43 +0000)]
Fix a bug that caused some /dev entries to continue to exist after
the underlying drive had been hot-unplugged from the system.  Here
is a specific example.  Filesystem code had opened /dev/da1s1e.
Subsequently, the drive was hot-unplugged.  This (correctly) caused
all of the associated /dev/da1* entries to be deleted.  When the
filesystem later realized that the drive was gone it closed the
device, reducing the write-access counts to 0 on the geom providers
for da1s1e, da1s1, and da1.  This caused geom to re-taste the
providers, resulting in the devices being created again.  When the
drive was hot-plugged back in, it resulted in duplicate /dev entries
for da1s1e, da1s1, and da1.

This fix adds a new disk_gone() function which is called by CAM when a
drive goes away.  It orphans all of the providers associated with the
drive, setting an error condition of ENXIO in each one.  In addition,
we prevent a re-taste on last close for writing if an error condition
has been set in the provider.

Sponsored by:   Isilon Systems
Reviewed by:    phk
MFC after:      1 week

18 years agodon't match packets other than IPv4 against divert rule.
ume [Fri, 18 Nov 2005 02:23:59 +0000 (02:23 +0000)]
don't match packets other than IPv4 against divert rule.
divert supports only IPv4.

Reported by: SAITOU Toshihide <toshi__at__ruby.ocn.ne.jp>
Discussed with: suz
MFC after: 1 day

18 years agoIn vfs_nmount(), check to see if "update" mount option was passed
rodrigc [Fri, 18 Nov 2005 01:31:10 +0000 (01:31 +0000)]
In vfs_nmount(), check to see if "update" mount option was passed
in, and if so, set MNT_UPDATE filesystem flag.
vfs_nmount() calls vfs_domount(), and there is special logic
inside vfs_domount() if MNT_UPDATE is set.  This is very important
when we want to do an update mount of the root filesystem, using nmount().

18 years agoNo CAVEAT about EISA attachment given that there is no EISA support
wilko [Thu, 17 Nov 2005 21:05:25 +0000 (21:05 +0000)]
No CAVEAT about EISA attachment given that there is no EISA support

Sort of submitted by: jhb
Forgotten in previous commit by: wilko

18 years agoPrint (total - used) as the amount of available swap for a swap device
rwatson [Thu, 17 Nov 2005 19:31:52 +0000 (19:31 +0000)]
Print (total - used) as the amount of available swap for a swap device
when printing swapinfo output, rather than (total), as that is (strictly
speaking) more accurate.

Pointed out by: Rob <spamrefuse at yahoo dot com>
MFC after: 3 days

18 years agoMention that this driver does not work on i386+PAE.
brueffer [Thu, 17 Nov 2005 16:43:56 +0000 (16:43 +0000)]
Mention that this driver does not work on i386+PAE.

Suggested by: scottl
MFC after: 3 days

18 years agoMention BCM5752 support in two more places.
brueffer [Thu, 17 Nov 2005 16:37:16 +0000 (16:37 +0000)]
Mention BCM5752 support in two more places.

18 years agoDocument tunables.
glebius [Thu, 17 Nov 2005 15:10:40 +0000 (15:10 +0000)]
Document tunables.

18 years ago-mdoc sweep.
ru [Thu, 17 Nov 2005 13:00:00 +0000 (13:00 +0000)]
-mdoc sweep.

18 years agoMFOpenBSD 1.62:
glebius [Thu, 17 Nov 2005 12:56:40 +0000 (12:56 +0000)]
MFOpenBSD 1.62:

  Prevent backup CARP hosts from replying to arp requests, fixes strangeness
  with some layer-3 switches. From Bill Marquette.

Tested by: Kazuaki Oda <kaakun highway.ne.jp>

18 years agoWhen a user is in more than 16 groups the call to authunix_create() will
harti [Thu, 17 Nov 2005 12:19:19 +0000 (12:19 +0000)]
When a user is in more than 16 groups the call to authunix_create() will
result in abort() beeing called. This is because there is a limit of
the number of groups in the RPC which is 16. When the actual number of
groups is too large it results in xdr_array() returning an error which,
in turn, authunix_create() handles by just calling abort().

Fix this by passing only the first 16 groups to authunix_create().

18 years agodoc sweep
ru [Thu, 17 Nov 2005 12:16:33 +0000 (12:16 +0000)]
doc sweep

18 years ago-mdoc sweep.
ru [Thu, 17 Nov 2005 12:15:23 +0000 (12:15 +0000)]
-mdoc sweep.

18 years agoCorrectly handle a TCP connection being shutdown by the server while
cperciva [Thu, 17 Nov 2005 11:01:32 +0000 (11:01 +0000)]
Correctly handle a TCP connection being shutdown by the server while
we're reading response headers.  (Handle it as a connection-killing
error, rather than entering an infinite loop reading zero bytes.)

Reported by: simon
Discovered thanks to: A not-very-transparent transparent HTTP proxy.
MFC after: 3 days

18 years ago- Backout last change, since it is memory overkill for a non busy host or
glebius [Thu, 17 Nov 2005 10:13:18 +0000 (10:13 +0000)]
- Backout last change, since it is memory overkill for a non busy host or
  for a notebook with em(4) adapter.
- Introduce tunables em.hw.txd and em.hw.rxd, which allow administrator
  to configure number of transmit and receive descriptors.
- Check em.hw.txd and em.hw.rxd against hardware limits [*] and require
  them to be multiple of 128.

[*] According to comments in if_em.h the 82540EM/82541ER chips can handle
    more than 256 descriptors. Since we don't have this hardware to test,
    we decided to mimic NetBSD wm(4) driver, that limits these chips to
    256 descriptors.

In collaboration with: yongari