Commit Graph

136124 Commits

Author SHA1 Message Date
Jason Evans
a0a474aed6 Use fixed point integer math instead of floating point math when
calculating run sizes.  Use of the floating point unit was a potential
pessimization to context switching for applications that do not otherwise
use floating point math. [1]

Reformat cpp macro-related comments to improve consistency.

Submitted by:	das
2007-12-18 05:27:57 +00:00
Andrew Thompson
1f019d8381 - Use the macro to check the port status has it will also test if its
administratively down (!IFF_UP)
 - Use the same parameters to lagg_link_active() to get the backup port as in
   the output path, this didnt actually matter in practice as sc_primary is
   always the first on the port list.

MFC after:	3 days
2007-12-18 02:12:03 +00:00
Maxim Sobolev
056c1a0528 Fix logical bug in the bzip2 reading code, which results in bogus EIO
returned on a perfectly valid bzip2 stream whose decompressed size
is multiple of read-ahead buffer size. Reproduce the problem is easy:
create some power-of-two sized file (truncate -s 1m file will do),
bzip2 it and try to load it as md_image from loader. See how it fails.

The bug doesn't affect gzip code (which most of bzip2-reading code was
copied from) probably due to the fact that libgzip doesn't report
Z_STREAM_END with the last block, but requires extra call to inflate()
to retrieve it and has some extra data in the input stream at that time.
However, apply similar fix to gzipfs.c just in the case the API will
change in the future to do what bzip2 code does.

Add some ifdef'ed code to enable testing bzipfs.c from witin normal
FreeBSD environment as opposed to the restricted loader one, so that
one can use gdb and whatnot.

Sponsored by:	Sippy Software, Inc., http://www.sippysoft.com/
MFC in:		7 days
2007-12-18 01:50:49 +00:00
Randall Stewart
83073fcba3 - sctp-iterator should run at PI_NET priority ...not 0.
MFC after:	1 week
2007-12-18 01:24:15 +00:00
David Schultz
8da510f8f5 Catch up with vfprintf.c,v 1.77. 2007-12-18 01:20:33 +00:00
David Schultz
0ba1fd2f72 Remove z_abs(). The z_*() functions were in libf77, and for some reason
someone thought it would be a good idea to copy z_abs() to libm in 1994.
However, it's never been declared or documented anywhere, and I'm
reasonably confident that nobody uses it.

Discussed with: bde, deischen, kan
2007-12-18 01:15:20 +00:00
Kip Macy
81186fb40c only include intr_machdep.h when it is needed for intr_bind
ia64 doesn't have an intr_machdep.h
2007-12-17 23:39:28 +00:00
Ken Smith
a87f4b3813 A few more adjustments needed because of changes in xorg. Just installing
xorg-server doesn't include any video drivers so install xorg-drivers as
well.  And if font-alias isn't installed the X server won't start,
complaining it can't find the font "fixed".

Insta-MFC coming, this was tested with a RELENG_6_3 release build and
the necessary packages as part of the first round of testing for 6.3-RC2.
2007-12-17 23:22:58 +00:00
Marcel Moolenaar
6d86273c0a Remove file after being repocopied to ../ofw, where it lives on.
Repocopy by: simon@
2007-12-17 22:50:39 +00:00
Marcel Moolenaar
22f4c5e3d9 Build the OFW loader from its new location after the sources
were repocopied from ./loader to ./ofw.
2007-12-17 22:19:44 +00:00
Marcel Moolenaar
fe6f1ad9e4 Forced commit to record that this file was repocopied from
src/sys/boot/powerpc/loader.

Repocopy by: simon@
2007-12-17 22:18:07 +00:00
Andrew Thompson
f51133ee3f Add myself to the copyright. 2007-12-17 18:49:44 +00:00
Bruce Evans
ccef8c4fcb Oops, the previous commit was not needed -- the file was committed but
not checked out due to my checkout error.
2007-12-17 18:21:23 +00:00
Bruce Evans
a18b106ffc Translate from the i386 so that this compiles and runs.
I hope that this and the i386 version of it will not be needed, but
this is currently about 16 cycles or 36% faster than the C version,
and the i386 version is about 8 cycles or 19% faster than the C
version, due to poor optimization of the C version.
2007-12-17 18:12:06 +00:00
Robert Watson
b5f992b93d Fix a MAC label leak for POSIX semaphores, in which per-policy labels
would be properly disposed of, but the global label structure for the
semaphore wouldn't be freed.

MFC after:	3 days
Reported by:	tanyong <tanyong at ercist dot iscas dot ac dot cn>,
		zhouzhouyi
2007-12-17 17:26:32 +00:00
Robert Watson
8b953b3f9d Fix leaking MAC labels for IPv6 inpcbs by adding missing MAC label
destroy call; this transpired because the inpcb alloc path for IPv4/IPv6
is the same code, but IPv6 has a separate free path.  The results was
that as new IPv6 TCP connections were created, kernel memory would
gradually leak.

MFC after:	3 days
Reported by:	tanyong <tanyong at ercist dot iscas dot ac dot cn>,
		zhouzhouyi
2007-12-17 17:20:57 +00:00
Michael Bushkov
36736e35e8 Moved logging out of the nss_method_lookup() in order not to
flood logs with failed fallback method lookup attempts.
2007-12-17 16:12:57 +00:00
Bruce Evans
9ed67737f2 Don't try to build s_nanl.c before it is committed. 2007-12-17 13:20:38 +00:00
Oleg Bulyzhin
d60810f26e Calculate p.fs.lookup_step correctly. This should prevent zeroing of
w_q_lookup table (used in RED algorithm for (1 - w_q)^t computation).

MFC after:	1 months
2007-12-17 10:25:56 +00:00
Kip Macy
c662126d0c disable update in place on transmit 2007-12-17 10:02:29 +00:00
Kip Macy
5e0f5cfaed Add SB_NOCOALESCE flag to disable socket buffer update in place 2007-12-17 10:02:01 +00:00
Diomidis Spinellis
3db8241bb4 Calling any function from vfork other than exec* and _exit yields
undefined behavior.

Noted by:	alfred
2007-12-17 09:02:42 +00:00
Kip Macy
8090c9f504 Make TCP offload work on HEAD (modulo negative interaction between sbcompress
and t3_push_frames).
 - Import latest changes to cxgb_main.c and cxgb_sge.c from toestack p4 branch
 - make driver local copy of tcp_subr.c and tcp_usrreq.c and override tcp_usrreqs so
   TOE can also functions on versions with unmodified TCP

- add cxgb back to the build
2007-12-17 08:17:51 +00:00
David Xu
7fab871d8c Check NULL pointer. 2007-12-17 08:09:37 +00:00
David Schultz
baa15be0ea Fix an int overflow on very large file systems.
PR:		bin/113399
Submitted by:	Staffan Ulfberg <staffan@ulfberg.se>
2007-12-17 08:03:18 +00:00
Kip Macy
228d1e266e build tcp_offload.c instead of tcp_ofld.c 2007-12-17 08:00:08 +00:00
Kip Macy
8b5709dfab incorporate feedback since initial commit
- rename tcp_ofld.[ch] to tcp_offload.[ch]
- document usage and locking conventions of the functions in the
  toe_usrreqs function vector
- document tcpcb, inpcb, and socket fields used by toe
- widen the listen interface into 2 functions
- rename DISABLE_TCP_OFFLOAD to TCP_OFFLOAD_DISABLE
- shrink conditional compilation to reduce the likelihood of bitrot
- replace sc->sc_toepcb checks in tcp_syncache.c with TOEPCB_ISSET
2007-12-17 07:56:27 +00:00
Kip Macy
29910a5a77 widen the routing event interface (arp update, redirect, and eventually pmtu change)
into separate functions

revert previous commit's changes to arpresolve and add a new interface
arpresolve2 which does arp resolution without an mbuf
2007-12-17 07:40:34 +00:00
Maxim Konovalov
fe832db659 o Fix a holiday to reflect a reality.
Submitted by:	Andrey V. Elsukov
MFC after:	1 week
2007-12-17 07:36:39 +00:00
David Xu
9514dcc041 Add missing changes for fixing LOR of umtx lock and thread lock, follow
the committing of files:
	kern_resource.c revision 1.181
	sched_4bsd.c	revision 1.111
	sched_ule.c	revision 1.218
2007-12-17 05:55:07 +00:00
Kevin Lo
5497f4c53e Use M_NOWAIT instead of M_WAITOK to cause malloc() to return NULL
Reviewed by: imp
2007-12-17 05:08:54 +00:00
Kip Macy
58505389d1 Don't panic in arpresolve if we're given a null mbuf. We could
insist that the caller just pass in an initialized mbuf even
if didn't have any data - but that seems rather contrived.
2007-12-17 04:19:25 +00:00
David Schultz
6821aba9e5 Add logbl(3) to libm. 2007-12-17 03:53:38 +00:00
David Xu
c5f411515c Add function prototypes. 2007-12-17 02:53:11 +00:00
Jason Evans
d55bd6236f Refactor features a bit in order to make it possible to disable lazy
deallocation and dynamic load balancing via the MALLOC_LAZY_FREE and
MALLOC_BALANCE knobs.  This is a non-functional change, since these
features are still enabled when possible.

Clean up a few things that more pedantic compiler settings would cause
complaints over.
2007-12-17 01:20:04 +00:00
David Schultz
3be0479b4c Document the fact that we have nan(3) now, and make some minor clarifications
in other places.
2007-12-17 01:04:43 +00:00
David Schultz
9cb4166881 On platforms where long is 64 bits, make sure gdtoa doesn't use a
long when it really wants an int.
2007-12-17 00:19:49 +00:00
David Schultz
5a97a86c28 Fix an amusing typo that has prevented this from compiling since 2004. 2007-12-16 23:38:55 +00:00
David Schultz
3f7112a1f4 Don't try the long double tests on i386. Our reduced precision
can cause them to fail.
2007-12-16 23:36:37 +00:00
David Schultz
fb048cca0c Fix previous commit: We should only mask the top bit in the STRTOG_NaNBits
case, not the STRTOG_Normal case.
2007-12-16 23:31:55 +00:00
Daniel Eischen
3d6d3ed091 Remove hacks to allow libkse to export its symbols in the LIBTHREAD_1_0
version namespace which was needed before the library version was
bumped.
2007-12-16 23:29:57 +00:00
David Schultz
64577b835b Remove another Alpha remnant. 2007-12-16 23:00:18 +00:00
Kip Macy
ea6ee7d60a Include cdefs.h and param.h for architectures with less header pollution 2007-12-16 21:22:24 +00:00
David Schultz
83f63fd648 Regression tests for nan{,f,l}(). 2007-12-16 21:19:51 +00:00
David Schultz
4b6b574455 Implement and document nan(), nanf(), and nanl(). This commit
adds two new directories in msun: ld80 and ld128. These are for
long double functions specific to the 80-bit long double format
used on x86-derived architectures, and the 128-bit format used on
sparc64, respectively.
2007-12-16 21:19:28 +00:00
Poul-Henning Kamp
e34f6b7311 Recognize CFA devices using either identification method. 2007-12-16 21:19:07 +00:00
Poul-Henning Kamp
164a5044a9 Add the magic word 0 value for CFA compliant devices. 2007-12-16 21:18:13 +00:00
David Schultz
39e7abef0e Export gdtoa's __ULto{x,Q}_D2A routine in a private namespace so
libm can use it.
2007-12-16 21:15:57 +00:00
David Schultz
199cdab56f Arrange so that the NaN returned by strtod("nan", NULL) is the same as
the NaN returned by strtod("nan()", NULL).
2007-12-16 21:15:09 +00:00
David Schultz
10a381e55a Fix strto{f,d,ld}() so they don't return signaling NaNs. C99
says they are never supposed to, and the fact that they did could
cause apps that run with unmasked FP exceptions to SIGFPE after a
scanf() or strtod(). The vendor stated that he will not be fixing
this, citing portability concerns.
2007-12-16 21:14:33 +00:00