Commit Graph

119874 Commits

Author SHA1 Message Date
Andre Oppermann
147f74d176 Purge layer specific mbuf flags on layer crossings to avoid confusing
upper or lower layers.

Sponsored by:	TCP/IP Optimization Fundraise 2005
2005-11-18 16:23:26 +00:00
Andre Oppermann
e86ebebc52 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
2005-11-18 14:48:42 +00:00
Andre Oppermann
780b2f698c 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
2005-11-18 14:44:48 +00:00
Andre Oppermann
861daeff3a Add KASSERTs to M_ALIGN() and MH_ALIGN() to prevent usage on wrong
mbuf types.

Sponsored by:	TCP/IP Optimization Fundraise 2005
2005-11-18 14:40:43 +00:00
Ruslan Ermilov
6b84cd5819 Fix markup, grammar and spelling. 2005-11-18 14:21:28 +00:00
Joseph Koshy
370366007b Cross-reference hwpmc(4). 2005-11-18 14:05:47 +00:00
Ruslan Ermilov
72d835d0a0 Unbreak and fix markup. 2005-11-18 14:01:11 +00:00
Ruslan Ermilov
5b1df41718 Fix warning, sort sections. 2005-11-18 13:53:36 +00:00
Ruslan Ermilov
19bb0c2774 Minor markup tweaks. 2005-11-18 13:50:59 +00:00
Ruslan Ermilov
502025d8b6 Minimally fix this manpage to not emit warnings. 2005-11-18 13:44:44 +00:00
Ruslan Ermilov
bf2ed57b3d Fix up markup. 2005-11-18 12:08:31 +00:00
Ruslan Ermilov
f32ac3955d Provide a short description. 2005-11-18 12:01:14 +00:00
Ruslan Ermilov
ca5137742a Fix up markup. 2005-11-18 11:54:14 +00:00
Ruslan Ermilov
5507a2aed5 Fix up markup etc. in recently born manpage. 2005-11-18 11:53:23 +00:00
Ruslan Ermilov
78ad54210f -mdoc sweep. 2005-11-18 10:56:28 +00:00
Ruslan Ermilov
4e9e907d63 -mdoc sweep. 2005-11-18 10:36:29 +00:00
Craig Rodrigues
26f59b6455 - 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().
2005-11-18 06:06:10 +00:00
Bruce Evans
3f1a8f462c 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.
2005-11-18 05:03:12 +00:00
John Polstra
a7e69e8b7d 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
2005-11-18 02:43:49 +00:00
Hajimu UMEMOTO
d1bb0919f0 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
2005-11-18 02:23:59 +00:00
Craig Rodrigues
8fd860cfa1 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().
2005-11-18 01:31:10 +00:00
Wilko Bulte
e6431fb208 No CAVEAT about EISA attachment given that there is no EISA support
Sort of submitted by: jhb
Forgotten in previous commit by: wilko
2005-11-17 21:05:25 +00:00
Robert Watson
a2e59d80d5 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
2005-11-17 19:31:52 +00:00
Christian Brueffer
0749cbc1a4 Mention that this driver does not work on i386+PAE.
Suggested by:	scottl
MFC after:	3 days
2005-11-17 16:43:56 +00:00
Christian Brueffer
9467c96723 Mention BCM5752 support in two more places. 2005-11-17 16:37:16 +00:00
Gleb Smirnoff
a97b26d057 Document tunables. 2005-11-17 15:10:40 +00:00
Ruslan Ermilov
110e1704d3 -mdoc sweep. 2005-11-17 13:00:00 +00:00
Gleb Smirnoff
218837618a 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>
2005-11-17 12:56:40 +00:00
Hartmut Brandt
251bb62d63 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().
2005-11-17 12:19:19 +00:00
Ruslan Ermilov
c3f2a836ad doc sweep 2005-11-17 12:16:33 +00:00
Ruslan Ermilov
8af1113166 -mdoc sweep. 2005-11-17 12:15:23 +00:00
Colin Percival
5c67112b9e 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
2005-11-17 11:01:32 +00:00
Gleb Smirnoff
7f4f47d3fa - 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
2005-11-17 10:13:18 +00:00
Ruslan Ermilov
389ec19476 Do not install boot_i386.8 on all architectures. 2005-11-17 09:39:36 +00:00
Pyun YongHyeon
dc22aef2ae Prefer NULL to 0.
Add missing lock/unlock in sysctl handler.
Protect accessing NULL pointer when resource allocation was failed.
style(9)

Reviewed by:	scottl
MFC after:	1 week
2005-11-17 08:56:21 +00:00
Ruslan Ermilov
1a9e52fbfb Remove vestiges of oldcard and owi. 2005-11-17 06:51:49 +00:00
Bruce Evans
75ff209cbb Minor cleanups:
s_cosf.c and s_sinf.c:
Use a non-bogus magic constant for the threshold of pi/4.  It was 2 ulps
smaller than pi/4 rounded down, but its value is not critical so it should
be the result of natural rounding.

s_cosf.c and s_tanf.c:
Use a literal 0.0 instead of an unnecessary variable initialized to
[(float)]0.0.  Let the function prototype convert to 0.0F.

Improved wording in some comments.

Attempted to improve indentation of comments.
2005-11-17 03:53:22 +00:00
SUZUKI Shinsuke
990634f5e8 fixed a typo in comment 2005-11-17 02:34:50 +00:00
David E. O'Brien
5ab591d4d9 Fix spelling mistake.
Submitted by:	kris
2005-11-17 02:32:39 +00:00
Bruce Evans
123e5d3dae Rearranged the the optimizations for special cases to reduce the average
number of branches.

Use a non-bogus magic constant for the threshold of pi/4.  It was 2 ulps
smaller than pi/4 rounded down, but its value is not critical so it should
be the result of natural rounding.  Use "<=" comparisons with rounded-
down thresholds for all small multiples of pi/4.

Cleaned up previous commit:
- use static const variables instead of expressions for multiples of pi/2
  to ensure that they are evaluated at compile time.  gcc currently
  evaluates them at compile time but C99 compilers are not required
  to do so.  We want compile time evaluation for optimization and don't
  care about side effects.
- use M_PI_2 instead of a magic constant for pi/2.  We need magic constants
  related to pi/2 elsewhere but not here since we just want pi/2 rounded
  to double and even prefer it to be rounded in the default rounding mode.
  We can depend on the cmpiler being C99ish enough to round M_PI_2 correctly
  just as much as we depended on it handling hex constants correctly.  This
  also fixes a harmless rounding error in the hex constant.
- keep using expressions n*<value for pi/2> in the initializers for the
  static const variables.  2*M_PI_2 and 4*M_PI_2 are obviously rounded in
  the same way as the corresponding infinite precision expressions for
  multiples of pi/2, and 3*M_PI_2 happens to be rounded like this, so we
  don't need magic constants for the multiples.
- fixed and/or updated some comments.
2005-11-17 02:20:04 +00:00
Olivier Houchard
fe0085433b Make the elf wrapper work with recent kernel.debug changes. 2005-11-17 01:32:01 +00:00
Warner Losh
b4c1801aa3 OBE 2005-11-16 20:58:56 +00:00
John Baldwin
db477d6cc8 Revert a part of the previous commits to these files that made the NMI
IPI_STOP handling code use atomic_readandclear() to execute the restart
function on the first CPU to resume and restore the behavior of always
executing the restart function on the BSP since this is in fact what the
non-NMI IPI_STOP handler does.  I did add back in a statement to clear
the restart function pointer after it is executed to match the behavior
of the non-NMI IPI_STOP handler.
2005-11-16 20:58:40 +00:00
Warner Losh
1c570dff3d this is no longer needed. 2005-11-16 20:58:35 +00:00
John Baldwin
fdb9ce3716 Revert previous commit to these files. There isn't a race necessitating
an xchg instruction as we only try to execute the startup function if
the CPU ID is 0 (i.e. the BSP).  I missed this earlier.
2005-11-16 20:55:57 +00:00
John Baldwin
b60119eb02 Fix a typo in the check for an invalid APIC. If we are told about an
I/O APIC that doesn't exist, then a read of the version register is going
to return -1 which is 0xffffffff not 0xffffff.

Tested on:	i386
Tested by:	Nikos Ntarmos ntarmos at ceid dot upatras dot gr
MFC after:	1 week
2005-11-16 20:29:29 +00:00
John Baldwin
a1cea66a50 Correct description of RLIMIT_CPU.
Reported by:	bde
2005-11-16 18:18:52 +00:00
Gleb Smirnoff
bf24183749 Xref ng_ether(4) and ng_iface(4) nodes, which are used in examples. 2005-11-16 14:08:17 +00:00
SUZUKI Shinsuke
a829cf5765 fixed a kernel crash due to an improper removal of callout-timer
(ToDo: similar fix is necessary for other NDP-related callout-timers
 in netinet6/nd6*.c)

PR: kern/88725
MFC after: 1 month
2005-11-16 12:36:08 +00:00
Ruslan Ermilov
1a6c5d9fac Unbreak on amd64. 2005-11-16 12:33:04 +00:00