]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoGrab one of the ifcap bits for netmap, and enable printing in ifconfig.
luigi [Tue, 14 Jun 2011 12:40:55 +0000 (12:40 +0000)]
Grab one of the ifcap bits for netmap, and enable printing in ifconfig.

Document the fact that we might want an IFCAP_CANTCHANGE mask,
even though the value is not yet used in sys/net/if.c

(asked on -current a week ago, no feedback so i assume no objection).

13 years agoSort alias mode flags in the increasing order.
ae [Tue, 14 Jun 2011 12:06:38 +0000 (12:06 +0000)]
Sort alias mode flags in the increasing order.

13 years agoAdd IPv6 support to the ipfw uid/gid check. Pass an ip_fw_args structure
ae [Tue, 14 Jun 2011 07:20:16 +0000 (07:20 +0000)]
Add IPv6 support to the ipfw uid/gid check. Pass an ip_fw_args structure
to the check_uidgid() function, since it contains all needed arguments
and also pointer to mbuf and now it is possible use in_pcblookup_mbuf()
function.

Since i can not test it for the non-FreeBSD case, i keep this ifdef
unchanged.

Tested by: Alexander V. Chernikov
MFC after: 3 weeks

13 years agosendmail has been updated to 8.14.5
gshapiro [Tue, 14 Jun 2011 06:45:48 +0000 (06:45 +0000)]
sendmail has been updated to 8.14.5

13 years agoUpdate notes regarding FreeBSD import
gshapiro [Tue, 14 Jun 2011 06:44:42 +0000 (06:44 +0000)]
Update notes regarding FreeBSD import

13 years agoMinor change to force commit this file so new freebsd*.cf files are
gshapiro [Tue, 14 Jun 2011 04:34:20 +0000 (04:34 +0000)]
Minor change to force commit this file so new freebsd*.cf files are
built to use the new sendmail-8.14.5/cf tree.

MFC after: 4 days

13 years agoUpdate DNSBL information (MAPS has been acquired, used a generic example)
gshapiro [Tue, 14 Jun 2011 04:33:43 +0000 (04:33 +0000)]
Update DNSBL information (MAPS has been acquired, used a generic example)

13 years agoMerge sendmail 8.14.5 to HEAD
gshapiro [Tue, 14 Jun 2011 04:20:18 +0000 (04:20 +0000)]
Merge sendmail 8.14.5 to HEAD

MFC after: 4 days

13 years agoImport errata patch as published at http://www.sendmail.com/sm/open_source/download...
gshapiro [Tue, 14 Jun 2011 03:59:08 +0000 (03:59 +0000)]
Import errata patch as published at http://www.sendmail.com/sm/open_source/download/8.14.5/

13 years agoImport sendmail 8.14.5
gshapiro [Tue, 14 Jun 2011 03:55:17 +0000 (03:55 +0000)]
Import sendmail 8.14.5

13 years agoInstead of using an atomic operation to determine whether the devstat(9)
ken [Mon, 13 Jun 2011 22:08:24 +0000 (22:08 +0000)]
Instead of using an atomic operation to determine whether the devstat(9)
device node has been created, pass MAKEDEV_CHECKNAME in so that the devfs
code will do the check.

Use a regular static variable as before, that's good enough to keep us from
calling into devfs most of the time.

Suggested by: kib
MFC after: 1 week
Sponsored by: Spectra Logic Corporation

13 years agoFix a couple of race conditions in devstat(9) initialization.
gibbs [Mon, 13 Jun 2011 21:21:02 +0000 (21:21 +0000)]
Fix a couple of race conditions in devstat(9) initialization.

In devstat_new_entry(), there is no need to initialize the queue
and the mutex in this function.  There are ways to do static
initialization on both, so use STAILQ_HEAD_INITIALIZER and
MTX_SYSINIT to initialize the queue and the mutex.

In devstat_alloc(), use an atomic test and set routine to guard
making our entry in /dev.  Using just a plain static variable
creates a race condition on multiprocessor machines.  If you
attempt to create a second entry in devfs, the kernel will panic.

Submitted by: kdm
Reviewed by: gibbs
Sponsored by: Spectra Logic Corporation
MFC after: 1 week.

13 years agosh: Fix duplicate prototypes for builtins.
jilles [Mon, 13 Jun 2011 21:03:27 +0000 (21:03 +0000)]
sh: Fix duplicate prototypes for builtins.

Have mkbuiltins write the prototypes for the *cmd functions to builtins.h
instead of builtins.c and include builtins.h in more .c files instead of
duplicating prototypes for *cmd functions in other headers.

13 years agoSeveral enhancements to the Xen block back driver.
gibbs [Mon, 13 Jun 2011 20:36:29 +0000 (20:36 +0000)]
Several enhancements to the Xen block back driver.

sys/dev/xen/blkback/blkback.c:
o Implement front-end request coalescing.  This greatly improves the
  performance of front-end clients that are unaware of the dynamic
  request-size/number of requests negotiation available in the
  FreeBSD backend driver.  This required a large restructuring
  in how this driver records in-flight transactions and how those
  transactions are mapped into kernel KVA.  For example, the driver
  now includes a mini "KVA manager" that allocates ranges of
  contiguous KVA to patches of requests that are physically
  contiguous in the backing store so that a single bio or UIO
  segment can be used to represent the I/O.

o Refuse to open any backend files or devices if the system
  has yet to mount root.  This avoids a panic.

o Properly handle "onlined" devices.  An "onlined" backend
  device stays attached to its backing store across front-end
  disconnections.  This feature is intended to reduce latency
  when a front-end does a hand-off to another driver (e.g.
  PV aware bootloader to OS kernel) or during a VM reboot.

o Harden the driver against a pathological/buggy front-end
  by carefully vetting front-end XenStore data such as the
  front-end state.

o Add sysctls that report the negotiated number of
  segments per-request and the number of requests that
  can be concurrently in flight.

Submitted by: kdm
Reviewed by: gibbs
Sponsored by: Spectra Logic Corporation
MFC after: 1 week

13 years agoAdd bunch of Conexant codec IDs. For some of them add quirks to disable
mav [Mon, 13 Jun 2011 20:34:12 +0000 (20:34 +0000)]
Add bunch of Conexant codec IDs. For some of them add quirks to disable
excessive signal paths to simplify tracer's life.

13 years agoAdd a new option -P to suppress getservbyport(3) calls when printing rules.
bz [Mon, 13 Jun 2011 20:11:28 +0000 (20:11 +0000)]
Add a new option -P to suppress getservbyport(3) calls when printing rules.
This allows one to force consistent printing of numeric port numbers like
we do with -n for other tools like netstat (just that -n was already taken)
rather than the service names.

-P is currently unused in OpenBSD so the change is eligible for upstreaming.

PR: misc/151015
Submitted by: Matt Koivisto (mkoivisto sandvine.com)
Sponsored by: Sandvine Incorporated
MFC after: 1 week

13 years agoConvert the allowed characters '-', '.', and ':' in a ZFS pool name to _
jpaetzel [Mon, 13 Jun 2011 19:45:01 +0000 (19:45 +0000)]
Convert the allowed characters '-', '.', and ':' in a ZFS pool name to _
to avoid causing errors in the shell script.

Submitted by: William Grzybowski <william88@gmail.com>
Approved by: kib (mentor)
MFC after: 7 days
Sponsored by: iXsystems

13 years agoUse alternative, less messy solution to avoid breakage after r223020:
dim [Mon, 13 Jun 2011 16:05:41 +0000 (16:05 +0000)]
Use alternative, less messy solution to avoid breakage after r223020:
put the snapdata structure between #ifdef _KERNEL guards.

Suggested by: kib

13 years agoAdvance the advertised window (rcv_adv) to the currently received data
jhb [Mon, 13 Jun 2011 15:38:31 +0000 (15:38 +0000)]
Advance the advertised window (rcv_adv) to the currently received data
(rcv_nxt) if we advertising a zero window.  This can be true when ACK'ing
a window probe whose one byte payload was accepted rather than dropped
because the socket's receive buffer was not completely full, but the
remaining space was smaller than the window scale.

This ensures that window probe ACKs satisfy the assumption made in r221346
and closes a window where rcv_nxt could be greater than rcv_adv.

Tested by: trasz, pho, trociny
Reviewed by: silby
MFC after: 1 week

13 years ago- Reduce diffs against i386.
nyan [Mon, 13 Jun 2011 13:24:33 +0000 (13:24 +0000)]
- Reduce diffs against i386.
- Add snd_uaudio.

13 years ago- Merge r222980 from x86: add sound(4) and common device drivers.
marius [Mon, 13 Jun 2011 12:45:19 +0000 (12:45 +0000)]
- Merge r222980 from x86: add sound(4) and common device drivers.
- Fix whitespace.

13 years agoUsing statfs.f_fstypename rather than statfs.f_type whilst performing fstype
avatar [Mon, 13 Jun 2011 05:22:07 +0000 (05:22 +0000)]
Using statfs.f_fstypename rather than statfs.f_type whilst performing fstype
comparsion as nullfs will copy f_type from underlayer FS.

PR: bin/156258
Submitted by: Marcin Wisnicki <mwisnicki+freebsd@gmail.com>
MFC after: 1 month

13 years agoFix ath_ahb(4) bus attach and eeprom error handling.
adrian [Mon, 13 Jun 2011 04:31:57 +0000 (04:31 +0000)]
Fix ath_ahb(4) bus attach and eeprom error handling.

Submitted by: Luiz Otavio O Souza <loos.br@gmail.com>

13 years agoApparently makefs needs a few more system headers to compile during
dim [Mon, 13 Jun 2011 01:04:00 +0000 (01:04 +0000)]
Apparently makefs needs a few more system headers to compile during
buildworld.

13 years agoUse swap32() right.
delphij [Sun, 12 Jun 2011 23:33:08 +0000 (23:33 +0000)]
Use swap32() right.

Submitted by: gcopper
MFC after: 2 weeks

13 years agoUnbreak usr.sbin/makefs after r223020.
dim [Sun, 12 Jun 2011 23:09:00 +0000 (23:09 +0000)]
Unbreak usr.sbin/makefs after r223020.

Pointy hat to: mckusick

13 years agosh: Save/restore changed variables in optimized command substitution.
jilles [Sun, 12 Jun 2011 23:06:04 +0000 (23:06 +0000)]
sh: Save/restore changed variables in optimized command substitution.

In optimized command substitution, save and restore any variables changed by
expansions (${var=value} and $((var=assigned))), instead of trying to
determine if an expansion may cause such changes.

If $! is referenced in optimized command substitution, do not cause jobs to
be remembered longer.

This fixes $(jobs $!) again, simplifies the man page and shortens the code.

13 years agoUpdate to soft updates journaling to properly track freed blocks
mckusick [Sun, 12 Jun 2011 19:27:05 +0000 (19:27 +0000)]
Update to soft updates journaling to properly track freed blocks
that get claimed by snapshots.

Submitted by: Jeff Roberson
Tested by: Peter Holm

13 years agoDo not report CFA devices as ATAPI, even though IDENTIFY data look alike.
mav [Sun, 12 Jun 2011 18:52:39 +0000 (18:52 +0000)]
Do not report CFA devices as ATAPI, even though IDENTIFY data look alike.

13 years agoDisable the soft updates journaling after a filesystem is successfully
mckusick [Sun, 12 Jun 2011 18:46:48 +0000 (18:46 +0000)]
Disable the soft updates journaling after a filesystem is successfully
downgraded to read-only. It will be restarted if the filesystem is
upgraded back to read-write.

13 years agoUpgrade our copy of llvm/clang to r132879, from upstream's trunk.
dim [Sun, 12 Jun 2011 18:01:31 +0000 (18:01 +0000)]
Upgrade our copy of llvm/clang to r132879, from upstream's trunk.

13 years agoVendor import of llvm trunk r132879:
dim [Sun, 12 Jun 2011 15:42:51 +0000 (15:42 +0000)]
Vendor import of llvm trunk r132879:
http://llvm.org/svn/llvm-project/llvm/trunk@132879

13 years agoI forgot what year it is, apparently.
nwhitehorn [Sun, 12 Jun 2011 15:19:38 +0000 (15:19 +0000)]
I forgot what year it is, apparently.

Submitted by: brucec

13 years agosh: Add test for LC_COLLATE-based character ranges in case.
jilles [Sun, 12 Jun 2011 12:55:46 +0000 (12:55 +0000)]
sh: Add test for LC_COLLATE-based character ranges in case.

13 years agosh: Fix locale-dependent ranges in bracket expressions.
jilles [Sun, 12 Jun 2011 12:54:52 +0000 (12:54 +0000)]
sh: Fix locale-dependent ranges in bracket expressions.

When I added UTF-8 support in r221646, the LC_COLLATE-based ordering broke
because of sign extension of char.

Because of libc restrictions, this does not work for UTF-8. For UTF-8
locales, ranges always use character code order.

13 years ago- Use REG_NOSUB to bypass submatch counting when not necessary. This may
gabor [Sun, 12 Jun 2011 12:51:58 +0000 (12:51 +0000)]
- Use REG_NOSUB to bypass submatch counting when not necessary. This may
  yield in somewhat better performance in a few cases.

Approved by: delphij (mentor)

13 years ago- Fix -w behavior
gabor [Sun, 12 Jun 2011 12:44:02 +0000 (12:44 +0000)]
- Fix -w behavior
- Make -F and -w work together
- Fix --color to colorize all of the matches

PR: bin/156826
Submitted by: Yuri Pankov <yuri.pankov@gmail.com>
Approved by: delphij (mentor)

13 years agosh: Add test for case pattern matching with iso-8859-1 charset.
jilles [Sun, 12 Jun 2011 12:27:17 +0000 (12:27 +0000)]
sh: Add test for case pattern matching with iso-8859-1 charset.

This also passes on stable/8.

13 years agosh: Read .profile from the home directory (or / if HOME is not set).
jilles [Sun, 12 Jun 2011 10:13:48 +0000 (10:13 +0000)]
sh: Read .profile from the home directory (or / if HOME is not set).

In most cases, login shells are started from the home directory, but not in
all, such as xterm -ls.

This commit depends on r222957 for read_profile() performing parameter
expansion.

PR: bin/50569

13 years agoAdd an MBR to our release media to aid booting some IBM systems.
nwhitehorn [Sun, 12 Jun 2011 00:14:57 +0000 (00:14 +0000)]
Add an MBR to our release media to aid booting some IBM systems.

13 years agoLong-overdue man page for bsdinstall.
nwhitehorn [Sat, 11 Jun 2011 21:44:07 +0000 (21:44 +0000)]
Long-overdue man page for bsdinstall.

13 years ago- Remove $ipv6_gateway_enable check.
hrs [Sat, 11 Jun 2011 21:41:44 +0000 (21:41 +0000)]
- Remove $ipv6_gateway_enable check.
- Use list_net_interfaces() instead of "ifconfig -l".

13 years agoAdd a helper function to check kern.features.* sysctls.
hrs [Sat, 11 Jun 2011 21:40:37 +0000 (21:40 +0000)]
Add a helper function to check kern.features.* sysctls.

Discussed with: dougb

13 years agoAdd self
crees [Sat, 11 Jun 2011 21:27:14 +0000 (21:27 +0000)]
Add self

Approved by: rene (mentor)

13 years agoAdd self to calendar
crees [Sat, 11 Jun 2011 21:26:12 +0000 (21:26 +0000)]
Add self to calendar

Approved by: rene (mentor)

13 years agoMake three one line changes to the rc scripts so that
rmacklem [Sat, 11 Jun 2011 21:14:22 +0000 (21:14 +0000)]
Make three one line changes to the rc scripts so that
they work with the new NFS client being the default,
since the new NFS client's module name is nfscl and
not nfsclient.

13 years agoAssert that page is VPO_BUSY or page owner object is locked in
kib [Sat, 11 Jun 2011 20:15:19 +0000 (20:15 +0000)]
Assert that page is VPO_BUSY or page owner object is locked in
vm_page_undirty(). The assert is not precise due to VPO_BUSY owner
to tracked, so assertion does not catch the case when VPO_BUSY is
owned by other thread.

Reviewed by: alc

13 years agoFix a bug in r222586. Lock the page owner object around the modification
kib [Sat, 11 Jun 2011 20:13:28 +0000 (20:13 +0000)]
Fix a bug in r222586. Lock the page owner object around the modification
of the m->dirty.

Reported and tested by: nwhitehorn
Reviewed by: alc

13 years agoFollow up r222980 on PowerPC: add sound(4) and common device drivers
nwhitehorn [Sat, 11 Jun 2011 12:34:08 +0000 (12:34 +0000)]
Follow up r222980 on PowerPC: add sound(4) and common device drivers
to PowerPC GENERIC (along with a small rearrangement).

13 years agoEnable sound support by default on i386 and amd64.
joel [Sat, 11 Jun 2011 09:08:46 +0000 (09:08 +0000)]
Enable sound support by default on i386 and amd64.

The generic sound driver has been added, along with enough
device-specific drivers to support the most common audio
chipsets.

We've discussed enabling it from time to time over the years
and we've received numerous requests from users, so we decided
that shipping 9.0 with working audio by default would be the
best thing to do.

Bug reports should be sent to the multimedia@ mailing list, as
usual.

Approved by:    mav
No objection:   re

13 years agoMonitor and emit events for XenStore changes to XenBus trees
gibbs [Sat, 11 Jun 2011 04:59:01 +0000 (04:59 +0000)]
Monitor and emit events for XenStore changes to XenBus trees
of the devices we manage.  These changes can be due to writes
we make ourselves or due to changes made by the control domain.
The goal of these changes is to insure that all state transitions
can be detected regardless of their source and to allow common
device policies (e.g. "onlined" backend devices) to be centralized
in the XenBus bus code.

sys/xen/xenbus/xenbusvar.h:
sys/xen/xenbus/xenbus.c:
sys/xen/xenbus/xenbus_if.m:
Add a new method for XenBus drivers "localend_changed".
This method is invoked whenever a write is detected to
a device's XenBus tree.  The default implementation of
this method is a no-op.

sys/xen/xenbus/xenbus_if.m:
sys/dev/xen/netfront/netfront.c:
sys/dev/xen/blkfront/blkfront.c:
sys/dev/xen/blkback/blkback.c:
Change the signature of the "otherend_changed" method.
This notification cannot fail, so it should return void.

sys/xen/xenbus/xenbusb_back.c:
Add "online" device handling to the XenBus Back Bus
support code.  An online backend device remains active
after a front-end detaches as a reconnect is expected
to occur in the near future.

sys/xen/interface/io/xenbus.h:
Add comment block further explaining the meaning and
driver responsibilities associated with the XenBus
Closed state.

sys/xen/xenbus/xenbusb.c:
sys/xen/xenbus/xenbusb.h:
sys/xen/xenbus/xenbusb_back.c:
sys/xen/xenbus/xenbusb_front.c:
sys/xen/xenbus/xenbusb_if.m:
o Register a XenStore watch against the local XenBus tree
  for all devices.
o Cache the string length of the path to our local tree.
o Allow the xenbus front and back drivers to hook/filter both
  local and otherend watch processing.
o Update the device ivar version of "state" when we detect
  a XenStore update of that node.

sys/dev/xen/control/control.c:
sys/xen/xenbus/xenbus.c:
sys/xen/xenbus/xenbusb.c:
sys/xen/xenbus/xenbusb.h:
sys/xen/xenbus/xenbusvar.h:
sys/xen/xenstore/xenstorevar.h:
Allow clients of the XenStore watch mechanism to attach
a single uintptr_t worth of client data to the watch.
This removes the need to carefully place client watch
data within enclosing objects so that a cast or offsetof
calculation can be used to convert from watch to enclosing
object.

Sponsored by: Spectra Logic Corporation
MFC after: 1 week

13 years agoAdd "context" subcommand to fetch and display SGE context.
np [Sat, 11 Jun 2011 04:55:15 +0000 (04:55 +0000)]
Add "context" subcommand to fetch and display SGE context.

13 years ago- driver ioctl to get SGE context for any given queue.
np [Sat, 11 Jun 2011 04:50:54 +0000 (04:50 +0000)]
- driver ioctl to get SGE context for any given queue.
- sysctls to display the context id, cidx, and pidx of all kinds of queues.

MFC after: 3 days

13 years agoSupport SIGHUP for reloading /etc/rtadvd.conf.
hrs [Sat, 11 Jun 2011 03:25:10 +0000 (03:25 +0000)]
Support SIGHUP for reloading /etc/rtadvd.conf.

13 years agoAdd the model number for the Montvale processor (marketed as Itanium 2 9100).
marcel [Sat, 11 Jun 2011 02:22:11 +0000 (02:22 +0000)]
Add the model number for the Montvale processor (marketed as Itanium 2 9100).
At this time we're missing just one: Tukwila (Itanium 2 9300).

13 years agoAdd comments about the validation.
delphij [Sat, 11 Jun 2011 01:19:19 +0000 (01:19 +0000)]
Add comments about the validation.

13 years agoImplement fully asynchronous partial truncation with softupdates journaling
jeff [Fri, 10 Jun 2011 22:48:35 +0000 (22:48 +0000)]
Implement fully asynchronous partial truncation with softupdates journaling
to resolve errors which can cause corruption on recovery with the old
synchronous mechanism.

 - Append partial truncation freework structures to indirdeps while
   truncation is proceeding.  These prevent new block pointers from
   becoming valid until truncation completes and serialize truncations.
 - On completion of a partial truncate journal work waits for zeroed
   pointers to hit indirects.
 - softdep_journal_freeblocks() handles last frag allocation and last
   block zeroing.
 - vtruncbuf/ffs_page_remove moved into softdep_*_freeblocks() so it
   is only implemented in one place.
 - Block allocation failure handling moved up one level so it does not
   proceed with buf locks held.  This permits us to do more extensive
   reclaims when filesystem space is exhausted.
 - softdep_sync_metadata() is broken into two parts, the first executes
   once at the start of ffs_syncvnode() and flushes truncations and
   inode dependencies.  The second is called on each locked buf.  This
   eliminates excessive looping and rollbacks.
 - Improve the mechanism in process_worklist_item() that handles
   acquiring vnode locks for handle_workitem_remove() so that it works
   more generally and does not loop excessively over the same worklist
   items on each call.
 - Don't corrupt directories by zeroing the tail in fsck.  This is only
   done for regular files.
 - Push a fsync complete record for files that need it so the checker
   knows a truncation in the journal is no longer valid.

Discussed with: mckusick, kib (ffs_pages_remove and ffs_truncate parts)
Tested by: pho

13 years agosh: Do parameter expansion on ENV before using it.
jilles [Fri, 10 Jun 2011 22:42:00 +0000 (22:42 +0000)]
sh: Do parameter expansion on ENV before using it.

This is required by POSIX, and allows things like ENV=\$HOME/.shrc.

Note that tilde expansion is explicitly not performed.

13 years ago - Eliminate an incorrect include path from the mthca build.
jeff [Fri, 10 Jun 2011 22:38:31 +0000 (22:38 +0000)]
 - Eliminate an incorrect include path from the mthca build.

13 years ago - Add support for referencing quota structures without needing the inode
jeff [Fri, 10 Jun 2011 22:19:44 +0000 (22:19 +0000)]
 - Add support for referencing quota structures without needing the inode
   pointer for softupdates.

Submitted by: mckusick

13 years ago - If the fsync in ufs_direnter fails SUJ can later panic because we have
jeff [Fri, 10 Jun 2011 22:18:25 +0000 (22:18 +0000)]
 - If the fsync in ufs_direnter fails SUJ can later panic because we have
   partially added a name.  Allow ufs_direnter() to continue in the
   hopes that it is a transient error.  If it is not, the directory
   is corrupted already from IO errors and writing this new block
   is not likely to make things worse.

13 years ago - When printing bufs with show buf the lblkno is often more useful than
jeff [Fri, 10 Jun 2011 22:15:36 +0000 (22:15 +0000)]
 - When printing bufs with show buf the lblkno is often more useful than
   the blkno.  Print them both.

13 years agoInclude sys/xen in cscope tag file generation.
gibbs [Fri, 10 Jun 2011 20:51:41 +0000 (20:51 +0000)]
Include sys/xen in cscope tag file generation.

13 years ago- Fix races on detach handling of AAC_IFFLAGS_* mask
attilio [Fri, 10 Jun 2011 20:23:56 +0000 (20:23 +0000)]
- Fix races on detach handling of AAC_IFFLAGS_* mask
- Fix races on setting AAC_AIFFLAGS_ALLOCFIBS
- Remove some unused AAC_IFFLAGS_* bits.
  Please note that the kthread still makes a difference between the
  total mask and AAC_AIFFLAGS_ALLOCFIBS because more flags may be
  added in the future to aifflags.

Sponsored by: Sandvine Incorporated
Reported and reviewed by: emaste
MFC after: 2 weeks

13 years agoRemove C constructs that are incompatible with C++ from various
gibbs [Fri, 10 Jun 2011 20:10:30 +0000 (20:10 +0000)]
Remove C constructs that are incompatible with C++ from various
OpenSolaris and ZFS header files.  These changes are sufficient
to allow a C++ program to use the libzfs library.

Note: The majority of these files already included 'extern "C"'
      declarations, so the intention of providing C++ compatibility
      already existed even if it wasn't provided.

cddl/compat/opensolaris/include/assert.h:
Wrap our compatibility assert implementation in
'extern "C"'.  Since this is a compatibility header
I matched the Solaris style of doing this explicitly
rather than rely on FreeBSD's __BEGIN/END_DECLS macro.

sys/cddl/compat/opensolaris/sys/kstat.h:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/ddt.h:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h:
Rename parameters in function declarations that conflict
with C++ keywords.  This was the solution preferred by
members of the Illumos community.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h:
In C, nested structures are visible in the global namespace,
but in C++, they take on the namespace of the structure in
which they are contained.  Flatten nested structure
definitions within struct zfs_cmd so these structures are
visible in the global namespace when compiled in both
languages.

Sponsored by:  Spectra Logic Corporation

13 years agoMake sure to drop the IEEE80211_RATE_BASIC flag even for MCS rates.
bschmidt [Fri, 10 Jun 2011 17:06:25 +0000 (17:06 +0000)]
Make sure to drop the IEEE80211_RATE_BASIC flag even for MCS rates.

Reported by: Maciej Milewski <milu at dat dot pl>
Tested by: Maciej Milewski <milu at dat dot pl>

13 years agoskel/.shrc: Improve commented CDPATH example for POSIX requirements.
jilles [Fri, 10 Jun 2011 13:47:11 +0000 (13:47 +0000)]
skel/.shrc: Improve commented CDPATH example for POSIX requirements.

POSIX says an empty entry in CDPATH shall not result in the new directory
being printed, while any non-empty entry shall result in the new directory
being printed, including ".". Therefore, the value of CDPATH should almost
always start with a colon, not dot and colon.

Our sh does not print the name for empty entries as well as "." entries.

MFC after: 1 week

13 years agoFix some off-by-one errors with the ending address of candidate regions
jhb [Fri, 10 Jun 2011 13:24:56 +0000 (13:24 +0000)]
Fix some off-by-one errors with the ending address of candidate regions
when attempting to grow a window.

13 years agoImplement BUS_ADJUST_RESOURCE() for the x86 drivers that sit between the
jhb [Fri, 10 Jun 2011 12:30:16 +0000 (12:30 +0000)]
Implement BUS_ADJUST_RESOURCE() for the x86 drivers that sit between the
Host-PCI bridge drivers and nexus.

13 years agoObtain bswap64() function implementation from
rodrigc [Fri, 10 Jun 2011 01:13:15 +0000 (01:13 +0000)]
Obtain bswap64() function implementation from
version 1.3 of src/common/lib/libc/gen/bswap64.c in NetBSD.

Obtained from: NetBSD

13 years agosh: Do parameter expansion before printing PS4 (set -x).
jilles [Thu, 9 Jun 2011 23:12:23 +0000 (23:12 +0000)]
sh: Do parameter expansion before printing PS4 (set -x).

The function name expandstr() and the general idea of doing this kind of
expansion by treating the text as a here document without end marker is from
dash.

All variants of parameter expansion and arithmetic expansion also work (the
latter is not required by POSIX but it does not take extra code and many
other shells also allow it).

Command substitution is prevented because I think it causes too much code to
be re-entered (for example creating an unbounded recursion of trace lines).

Unfortunately, our LINENO is somewhat crude, otherwise PS4='$LINENO+ ' would
be quite useful.

13 years agoMFV: Update to less v444.
delphij [Thu, 9 Jun 2011 22:52:57 +0000 (22:52 +0000)]
MFV: Update to less v444.

MFC after: 2 weeks

13 years agocxgbetool: a tool for the cxgbe(4) driver.
np [Thu, 9 Jun 2011 20:21:45 +0000 (20:21 +0000)]
cxgbetool: a tool for the cxgbe(4) driver.

13 years agoContrary to when returning in all-good cases at the end of functions we
bz [Thu, 9 Jun 2011 19:52:28 +0000 (19:52 +0000)]
Contrary to when returning in all-good cases at the end of functions we
did not free memory (1) or close the file descriptor (2) in error cases.

Reported by: Mark Johnston (1)
Reported by: attilio (2)
Reviewed by: jhb
Sponsored by: Sandvine Incorporated
MFC after: 1 week

13 years agoAdd -Wa,-many to CFLAGS on PowerPC. This aids in building a kernel using
nwhitehorn [Thu, 9 Jun 2011 19:47:30 +0000 (19:47 +0000)]
Add -Wa,-many to CFLAGS on PowerPC. This aids in building a kernel using
clang, which would otherwise complain about some 64-bit bridge mode
instructions.

13 years agoIntel NM10 chipset's SATA controller has same PCI ID and revision as ICH7's,
mav [Thu, 9 Jun 2011 16:30:13 +0000 (16:30 +0000)]
Intel NM10 chipset's SATA controller has same PCI ID and revision as ICH7's,
but has only 2 SATA ports instead of 4. The worst part is that SStatus and
SError registers for missing ports are not implemented and return wrong
values (0xffffffff), that caused infinite reset loop.

Just ignore that SError value while I found no better way to identify them.

13 years agoMinor typo, fix 2 attributions
dougb [Thu, 9 Jun 2011 06:10:39 +0000 (06:10 +0000)]
Minor typo, fix 2 attributions

13 years agoTidy up r222866.
jkim [Wed, 8 Jun 2011 23:44:59 +0000 (23:44 +0000)]
Tidy up r222866.

- Re-add accidentally removed atomic op. for sysctl(9) handler.
- Remove a period(`.') at the end of a debugging message.
- Consistently spell "low" for "TSC-low" timecounter throughout.

Pointed out by: bde

13 years agoAdd dump.c to the rtsol build. It is needed now that sec2str is non-static
ken [Wed, 8 Jun 2011 21:59:07 +0000 (21:59 +0000)]
Add dump.c to the rtsol build.  It is needed now that sec2str is non-static
and used in rtsold.c.

13 years agosh: Add simple tests for set -x and PS4.
jilles [Wed, 8 Jun 2011 21:58:19 +0000 (21:58 +0000)]
sh: Add simple tests for set -x and PS4.

13 years agoSimply post r222273.
obrien [Wed, 8 Jun 2011 21:29:33 +0000 (21:29 +0000)]
Simply post r222273.

13 years ago- Major reorganization of mbuf handling throughout the driver to
davidch [Wed, 8 Jun 2011 21:18:14 +0000 (21:18 +0000)]
- Major reorganization of mbuf handling throughout the driver to
  increase robustness (no more calls to panic(9)) and simplify
  code.
- Allocate RX/TX data structures as a single buffer rather than
  an array of 4KB pages to simplify code.
- Fixed LRO (aka TPA) code.  Removed kernel module parameter and
  support enabling disabling LRO through ifconfig(8) command line.
  LRO is still disabled by default but should be enabled for best
  performance on an endpoint device.
- Fixed statistcs code and removed kernel module parameter (stats
  should just work).
- Added many software counters to help identify the cause of some
  performance issues.
- Streamlined adapter internal init/stop code paths.
- Fiddled with debug code (adding some here, removing some there).
- Continued style(9) adjustments.

13 years agoIncrease quality of TSC (or TSC-low) timecounter to 1000 if it is P-state
jkim [Wed, 8 Jun 2011 20:08:06 +0000 (20:08 +0000)]
Increase quality of TSC (or TSC-low) timecounter to 1000 if it is P-state
invariant.  For SMP case (TSC-low), it also has to pass SMP synchronization
test and the CPU vendor/model has to be white-listed explicitly.  Currently,
all Intel CPUs and single-socket AMD Family 15h processors are listed here.

Discussed with: hackers

13 years agoIntroduce low-resolution TSC timecounter "TSC-low". It replaces the normal
jkim [Wed, 8 Jun 2011 19:38:31 +0000 (19:38 +0000)]
Introduce low-resolution TSC timecounter "TSC-low".  It replaces the normal
TSC timecounter if TSC frequency is higher than ~4.29 MHz (or 2^32-1 Hz) or
multiple CPUs are present.  The "TSC-low" frequency is always lower than a
preset maximum value and derived from TSC frequency (by being halved until
it becomes lower than the maximum).  Note the maximum value for SMP case is
significantly lower than UP case because we want to reduce (rare but known)
"temporal anomalies" caused by non-serialized RDTSC instruction.  Normally,
it is still higher than "ACPI-fast" timecounter frequency (which was default
timecounter hardware for long time until r222222) to be useful.

13 years agoIn the current code, a double panic condition may lead to dumps
attilio [Wed, 8 Jun 2011 19:28:59 +0000 (19:28 +0000)]
In the current code, a double panic condition may lead to dumps
interleaving.
Signal dumping to happen only for the first panic which should be the
most important.

Sponsored by: Sandvine Incorporated
Submitted by: Nima Misaghian (nmisaghian AT sandvine DOT com)
MFC after: 2 weeks

13 years agoRemove a redundant assignment since r221703.
jkim [Wed, 8 Jun 2011 18:52:42 +0000 (18:52 +0000)]
Remove a redundant assignment since r221703.

13 years ago- Accumulate RA options instead of replacing old ones when a new RA arrived.
hrs [Wed, 8 Jun 2011 16:03:29 +0000 (16:03 +0000)]
- Accumulate RA options instead of replacing old ones when a new RA arrived.
  RFC 4861 6.3.4 clearly defines handling multiple RAs in this way.

- RDNSS/DNSSL options from multiple RAs on a single link will be
  gathered and sent to resolvconf(8).

- Call "resolvconf -d" only after at least one RDNSS or DNSSL option is
  received and then all of them are expired.

- The rtsold.dump output now supports displaying a list of the RA options.

- Use more human-readable expression for logging values of struct timeval.

Discussed with: ume

13 years ago- Improve error handling.
andreast [Wed, 8 Jun 2011 16:00:30 +0000 (16:00 +0000)]
- Improve error handling.
- Add retry loops in the i2c read/write functions.
- Combied the ADC channel selection and readout of the value into
  one iicbus_transfer to avoid possible races.

Reviewed by: nwhitehorn

13 years agoCompile RTLD with global dot symbols on 64-bit PowerPC, as a crutch for
nwhitehorn [Wed, 8 Jun 2011 13:23:35 +0000 (13:23 +0000)]
Compile RTLD with global dot symbols on 64-bit PowerPC, as a crutch for
GDB's ability to locate r_debug_state (which is actually the only function
that need be compiled this way).

13 years agoAdd the missing call to ip6_ipsec_filtertunnel() to be able to control
bz [Wed, 8 Jun 2011 10:59:36 +0000 (10:59 +0000)]
Add the missing call to ip6_ipsec_filtertunnel() to be able to control
whether decapsulated IPsec packets will be passed to pfil again depending
on the setting of the net.ip6.ipsec6.filtertunnel sysctl.

PR: kern/157670
Submitted by: Manuel Kasper (mk neon1.net)
MFC after: 2 weeks

13 years agoAdded FreeBSD 8.3.
ru [Wed, 8 Jun 2011 08:16:32 +0000 (08:16 +0000)]
Added FreeBSD 8.3.

13 years agoremove code for dynamic offlining/onlining of CPUs on x86
avg [Wed, 8 Jun 2011 08:12:15 +0000 (08:12 +0000)]
remove code for dynamic offlining/onlining of CPUs on x86

The code has definitely been broken for SCHED_ULE, which is a default
scheduler.  It may have been broken for SCHED_4BSD in more subtle ways,
e.g. with manually configured CPU affinities and for interrupt devilery
purposes.
We still provide a way to disable individual CPUs or all hyperthreading
"twin" CPUs before SMP startup.  See the UPDATING entry for details.

Interaction between building CPU topology and disabling CPUs still
remains fuzzy: topology is first built using all availble CPUs and then
the disabled CPUs should be "subtracted" from it.  That doesn't work
well if the resulting topology becomes non-uniform.

This work is done in cooperation with Attilio Rao who in addition to
reviewing also provided parts of code.

PR: kern/145385
Discussed with: gcooper, ambrisko, mdf, sbruno
Reviewed by: attilio
Tested by: pho, pluknet
X-MFC after: never

13 years agoPull up all vendor changes to mdoc(7).
ru [Wed, 8 Jun 2011 08:08:42 +0000 (08:08 +0000)]
Pull up all vendor changes to mdoc(7).

This also replaces the local fix in r219209 that made .Ac emit
ASCII angle quotes with an official fix.  In the official fix,
ASCII quotes are output when using the .Aq, .Ao and .Ac calls,
but only when nested into the .An macro.

PR: gnu/154822

13 years ago- Disable "resolvconf -d" temporarily to avoid extra invocations of the script
hrs [Wed, 8 Jun 2011 04:06:56 +0000 (04:06 +0000)]
- Disable "resolvconf -d" temporarily to avoid extra invocations of the script
  under a certain condition.
- Fix argv handling.

Spotted by: ume

13 years agoCorrect comments and debug logging in ipsec to better match reality.
bz [Wed, 8 Jun 2011 03:02:11 +0000 (03:02 +0000)]
Correct comments and debug logging in ipsec to better match reality.

MFC after: 3 days

13 years agoUse .Dq instead of hardcoding `` and ''.
delphij [Wed, 8 Jun 2011 00:31:10 +0000 (00:31 +0000)]
Use .Dq instead of hardcoding `` and ''.

Suggested by: gjb

13 years ago- For the case when tl1_align(_trap) is used to call rsf_fatal via
marius [Tue, 7 Jun 2011 23:15:21 +0000 (23:15 +0000)]
- For the case when tl1_align(_trap) is used to call rsf_fatal via
  RSF_FATAL we need to switch to alternate globals for KSTACK_CHECK just
  like tl1_data_excptn(_trap) does. This is more or less cosmetic because
  in case RSF_FATAL is called we're already heading south.
- Correct an END().
- Read the window state from the correct register for a CATR().

13 years agoSilence notice on pool creation, import and access.
mm [Tue, 7 Jun 2011 20:46:31 +0000 (20:46 +0000)]
Silence notice on pool creation, import and access.

Suggested by: Jeremy Chadwick (freebsd-stable@)
Discussed with: pjd
MFC after: 1 week

13 years agoSet curvnet context in a callout-trigerred code path.
zec [Tue, 7 Jun 2011 20:46:03 +0000 (20:46 +0000)]
Set curvnet context in a callout-trigerred code path.

MFC after: 3 days

13 years agoFor the moment document the possible problem introduced with dynamic address
bz [Tue, 7 Jun 2011 19:39:34 +0000 (19:39 +0000)]
For the moment document the possible problem introduced with dynamic address
family detection in world, mostly noticed by ifconfig(8), when running with
an old kernel.

Reported by: Andrzej Tobola (ato iem.pw.edu.pl)
Reported by: gcooper