Commit graph

42477 commits

Author SHA1 Message Date
Robert Watson 3164565d39 Temporarily turn net.isr.enable back off again until patches to
correct potential nits in packet ordering are resolved.
2003-10-01 22:15:16 +00:00
Hajimu UMEMOTO 5d40536819 add randomtab for ip6_randomflowlabel().
Obtained from:	KAME
2003-10-01 21:45:57 +00:00
Robert Watson 19288f738a Enable net.isr.enable by default, causing "delivery to completion"
(direct dispatch) in interrupt threads when the netisr in question
isn't already active.  If a netisr is already active, or direct
dispatch is already in progress, we queue the packet for later
delivery.  Previously, this option was disabled by default.  I have
measured 20%+ performance improvements in IP packet forwarding with
this enabled.

Please report any problems ASAP, especially relating to stack depth or
out-of-order packet processing.

Discussed with:	jlemon, peter
Sponsored by:	DARPA, Network Associates Laboratories
2003-10-01 21:31:09 +00:00
Hajimu UMEMOTO b79274ba41 randomize IPv6 flowlabel when RANDOM_IP_ID is defined.
Obtained from:	KAME
2003-10-01 21:24:28 +00:00
Hajimu UMEMOTO 18193b6f63 use arc4random() 2003-10-01 21:10:02 +00:00
Hajimu UMEMOTO de27a78aca - include opt_random_ip_id.h
- we don't need to obtain microtime when using ip6_randomid.
2003-10-01 20:24:20 +00:00
Hajimu UMEMOTO 8513854d16 we don't need ip6_id when RANDOM_IP_ID is defined. 2003-10-01 18:23:27 +00:00
Hajimu UMEMOTO 01e22dc51b include opt_random_ip_id.h 2003-10-01 17:28:42 +00:00
Hajimu UMEMOTO 672467eb28 Don't compiled ip6_randomid() in if RANDOM_IP_ID is not defined. 2003-10-01 16:22:58 +00:00
Hajimu UMEMOTO 2923494300 Obey RANDOM_IP_ID.
Requested by:	sam
2003-10-01 16:00:12 +00:00
Hajimu UMEMOTO 8373d51d4b randomize IPv6 fragment ID.
Obtained from:	KAME
2003-10-01 15:13:29 +00:00
Bernd Walter 1313b38492 Fix indention
Noticed by:	johan
2003-10-01 14:49:53 +00:00
Bernd Walter a244477908 Don't call makedev().
Cache result of make_dev() and use it when calling destroy_dev().
2003-10-01 13:53:51 +00:00
Maxime Henrion a214dd13e8 Remove extra parentheses from the __GNUC_PREREQ__ macro.
Prodded by:	bde
2003-10-01 11:26:20 +00:00
Søren Schmidt 6d92de35c9 Fix the problem with accessing certain FLASH devices. The problem
was that accessing the status reg could occour too fast, confusing
the logic in the flash part. Could not have been located without:

HW donated by: Jonas Bülow <jonas@servicefactory.se>
2003-10-01 09:58:19 +00:00
Jeff Roberson 460c513686 - Add a memory barrier before the sse2_pagezero() function returns. This
code uses write combining which must be committed to memory prior to
   other uses of this page.

Spotted by:	alc
2003-10-01 08:52:46 +00:00
Ruslan Ermilov deb62e2887 By popular demand, added the "static ARP" per-interface option. 2003-10-01 08:32:37 +00:00
Hidetoshi Shimokawa c727011a76 Fix a bug in fwdev_clone().
Spotted by: grog
2003-10-01 06:04:30 +00:00
Jeff Roberson 1419773de3 - Hide more #ifdef logic in a new invlcaddr inline. This function flushes
the full tlb if you're on an I386or does an invlpg otherwise.

Glanced at by:	peter
2003-10-01 05:56:46 +00:00
Jeff Roberson 043407f803 - Define an inline pagezero() to select the appropriate full-page zeroing
function from one of bzero, i686_pagezero, or sse2_pagezero.
 - Use pagezero() in the three pmap functions that need to zero full pages.
2003-10-01 05:42:58 +00:00
Jeff Roberson 977f9ab515 - Add ss2_pagezero() for zeroing pages using the movnti instruction. This
instruction is enabled with SSE2 but does not use SSE registers.  It is a
   "non-temporal" move which bypasses the cache and does not dirty lines.
2003-10-01 05:25:27 +00:00
Peter Wemm a93020d7a1 Use __register_t instead of register_t, otherwise <sys/types.h> is a
prerequisite for <ucontext.h> on amd64.  Oops.
2003-10-01 01:08:04 +00:00
Jeff Roberson fb9bde2d2b - Correct a problem with the last commit. The CMAP ptes need to be zeroed
prior to invalidating the TLB to be certain that the processor doesn't
   keep a cached copy.

Discussed with:	pete
Paniced:	tegge
Pointy Hat:	The usual spot
2003-10-01 00:27:09 +00:00
Maxime Henrion 4e513b7a01 Allow the compiler to micro-optimize byte swapping functions by
evaluating them at compile time rather than at run time.  As for x86
and amd64, this requires GCC and it's enabled only if __OPTIMIZE__ is
defined (ie, if at least -O is used).

Reviewed by:	jake
2003-09-30 22:35:27 +00:00
Maxime Henrion d68d22ba52 Use __predict_false() in the KASSERT() macro. We expect this test
to fail most of the time.
2003-09-30 20:54:12 +00:00
Maxime Henrion 6e478cc056 Introduce new __predict_false(exp) and __predict_true(exp) keywords.
Their purpose is to give explicit hints to the compiler to judge
the likelyhood of a test to succeed or fail.  Not all architectures
have support for such optimizations, but for those who do, it can
give a nice performance improvement in hot loops.

Obviously, this should be used very rarely in very specific code.

Reviewed by:	peter
Obtained from:	OpenBSD
2003-09-30 20:45:14 +00:00
Maxime Henrion 91dc1097d1 Define a new __GNUC_PREREQ__(maj, min) to test if we have a specific
version of GCC or later and use it where appropriate.  It makes this
file more readable.

Obtained from:	OpenBSD
2003-09-30 20:34:57 +00:00
Nate Lawson ae0781a1cb Revert 1.24. It causes a hang on shutdown for Marcel. This is due to
AcpiEnterSleepState() calling a long AcpiOsStall() with interrupts
disabled.  This fix will instead be added to ACPI-CA.

PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from:
MFC after:
2003-09-30 19:12:37 +00:00
Dag-Erling Smørgrav 7ea97b6027 Fix a (fortunately harmless) signed / unsigned bug. 2003-09-30 13:35:19 +00:00
Hajimu UMEMOTO 386caafbf7 Reduce diffs against KAME. No functional change.
Obtained from:	KAME
2003-09-30 10:52:49 +00:00
Hajimu UMEMOTO a7012295b4 Reduce diffs against KAME. No functional change.
Obtained from:	KAME
2003-09-30 09:06:58 +00:00
Jeff Roberson fa3f9daae5 - On my Pentium4-M laptop, invalpg takes ~1100 cycles if the page is found in
the TLB and ~1600 if it is not.  Therefore, it is more effecient to
   invalidate the TLB after operations that use CMAP rather than before.
 - So that the tlb is invalidated prior to switching off of a processor, we
   must change the switchin functions to switchout functions.
 - Remove td_switchout from the thread and move it to the x86 pcb.
 - Move the code that calls switchout into swtch.s.  These changes make this
   optimization truely x86 specific.
2003-09-30 08:11:36 +00:00
Hidetoshi Shimokawa 60ddd2e45c - Pick up a correct path_id for the bus on AC_PATH_REGISTERED.
- Call cam_periph_invalidate() only if the periph is found.
2003-09-30 08:03:52 +00:00
Hajimu UMEMOTO aa73b85dc8 Sync style and comments with latest KAME to reduce diffs.
No functional change.

Obtained from:	KAME
2003-09-30 07:57:05 +00:00
Poul-Henning Kamp 2cac580671 GEOMify. 2003-09-30 07:52:15 +00:00
Peter Wemm ba5a51ea04 MFi386: Do not depend on LEAPYEAR() macro boolean values being 0 or 1.
MFi386: Add quality field for timer0
2003-09-30 06:42:47 +00:00
Peter Wemm ec548f97fc MFi386: BURN_BRIDGES around timer0 functions 2003-09-30 06:38:11 +00:00
Jeff Roberson 3c4d5e1546 - Remove the definition for TD_SWITCHIN as it is not used.
Approved by:	peter
2003-09-30 04:52:24 +00:00
Jeff Roberson f75766288d - Correct a typo in a comment. 2003-09-30 04:51:12 +00:00
Sam Leffler b140bc1fc8 Correct pfil_run_hooks return handling: if the return value is non-zero
then the mbuf has been consumed by a hook; otherwise beware of a null
mbuf return (gack).  In particular the bridge was doing the wrong thing.
While in the ipv6 code make it's handling of pfil_run_hooks identical
to netbsd.

Pointed out by:	Pyun YongHyeon <yongari@kt-is.co.kr>
2003-09-30 04:46:08 +00:00
Peter Wemm 00f553ed0c Stop this warning:
"Makefile", line 35: warning: "grep DDB opt_ddb.h" returned non-zero status
2003-09-30 03:49:09 +00:00
Sam Leffler 9ffa96777e MFp4: portability work, general cleanup, locking fixes
change 38496
o add ipsec_osdep.h that holds os-specific definitions for portability
o s/KASSERT/IPSEC_ASSERT/ for portability
o s/SPLASSERT/IPSEC_SPLASSERT/ for portability
o remove function names from ASSERT strings since line#+file pinpints
  the location
o use __func__ uniformly to reduce string storage
o convert some random #ifdef DIAGNOSTIC code to assertions
o remove some debuggging assertions no longer needed

change 38498
o replace numerous bogus panic's with equally bogus assertions
  that at least go away on a production system

change 38502 + 38530
o change explicit mtx operations to #defines to simplify
  future changes to a different lock type

change 38531
o hookup ipv4 ctlinput paths to a noop routine; we should be
  handling path mtu changes at least
o correct potential null pointer deref in ipsec4_common_input_cb

chnage 38685
o fix locking for bundled SA's and for when key exchange is required

change 38770
o eliminate recursion on the SAHTREE lock

change 38804
o cleanup some types: long -> time_t
o remove refrence to dead #define

change 38805
o correct some types: long -> time_t
o add scan generation # to secpolicy to deal with locking issues

change 38806
o use LIST_FOREACH_SAFE instead of handrolled code
o change key_flush_spd to drop the sptree lock before purging
  an entry to avoid lock recursion and to avoid holding the lock
  over a long-running operation
o misc cleanups of tangled and twisty code

There is still much to do here but for now things look to be
working again.

Supported by:	FreeBSD Foundation
2003-09-29 22:57:43 +00:00
Sam Leffler 1a920b1142 os dependency glue file for improving portability
Submitted by:	<jonathan@decru.com>
Supported by:	FreeBSD Foundation
Obtained from:	NetBSD
2003-09-29 22:47:45 +00:00
Robert Watson 309cd88432 Add a new column to the procfs map to hold the name of the mapped
file for vnode mappings.  Note that this uses vn_fullpath() and may
be somewhat unreliable, although not too unreliable for shared
libraries.  For non-vnode mappings, just print "-" for the field.

Obtained from:	TrustedBSD Projects
Sponsored by:	DARPA, AFRL, Network Associates Laboratories
2003-09-29 20:53:19 +00:00
Robert Watson cc7b13bfe0 If the struct mac copied into the kernel has a negative length, return
EINVAL rather than failing the following malloc due to the value being
too large.
2003-09-29 18:35:17 +00:00
Scott Long 5dfa218a11 Remove the static reservations for the raid and raidctl devices. 2003-09-29 14:15:57 +00:00
Scott Long 9f099823a1 Use a dynamic major assignment for the raidctl device. 2003-09-29 14:14:35 +00:00
Scott Long ca0ef5374f aac no longer uses a static major number. 2003-09-29 14:11:23 +00:00
Scott Long c567467af2 Eliminate the use of a statically assign major number for the aac device. 2003-09-29 14:10:04 +00:00
Greg Lehey be0dabc1bc If we fail to complete configuring a subdisk because of some error,
make sure we return any allocated space to the drive.  This should get
rid of a number of inconsistencies (hopefully all) that have been seen
after configuration errors.
2003-09-29 08:50:03 +00:00