dragonfly.git
10 years agoGive /usr/local/... precedence over /usr/pkg/... in various paths.
Sascha Wildner [Mon, 20 May 2013 12:50:45 +0000 (14:50 +0200)]
Give /usr/local/... precedence over /usr/pkg/... in various paths.

10 years agoroute: Remove the unused rt_addrinfo parameter from ifa_rtrequest
Sepherosa Ziehau [Fri, 31 May 2013 09:36:42 +0000 (17:36 +0800)]
route: Remove the unused rt_addrinfo parameter from ifa_rtrequest

10 years agokernel - Fix TDF_NOFAULT issue related to vm.read_shortcut_enable.
Matthew Dillon [Fri, 31 May 2013 06:16:29 +0000 (23:16 -0700)]
kernel - Fix TDF_NOFAULT issue related to vm.read_shortcut_enable.

* TDF_NOFAULT was not preventing vm_fault() from calling vm_wait_pfault(),
  which could result in a deadlock in the read_shortcut path.  A combination
  of a low-memory situation plus the read_shortcut hitting the vm_fault
  sequence from uiomove_nofault().

10 years agoCorrect BSD License clause numbering from 1-2-4 to 1-2-3.
Justin C. Sherrill [Fri, 31 May 2013 00:27:15 +0000 (20:27 -0400)]
Correct BSD License clause numbering from 1-2-4 to 1-2-3.

Apparently everyone's doing it:
http://svnweb.freebsd.org/base?view=revision&revision=251069

Submitted-by: "Eitan Adler" <lists at eitanadler.com>
10 years agocpdup - roll 1.18 for ports consumers
Matthew Dillon [Thu, 30 May 2013 20:54:44 +0000 (13:54 -0700)]
cpdup - roll 1.18 for ports consumers

* Add the -n option.  This is the not-for-real option.  cpdup will go through
  the motions but not actually take any action.  Useful for validating a
  topology without modifying it, e.g. 'cpdup -n -v -VV source target'.

* Fix clang static/global and alignment warnings

* Bump rev to 1.18

* Porters please note that this release has added an __aligned(n)
  directive to two structures.  BSDs and linux's should be able to
  handle this no-problem but just like __printflike() it is a bit
  of a departure from standard.

* Ports URL: fetch http://apollo.backplane.com/FreeBSDPorts/cpdup-1.18.tar.gz

Submitted-by: (static/global fixes) "Eitan Adler" <lists@eitanadler.com>
Submitted-by: (n-option & alignment fixes) dillon
Testing-by: "Eitan Adler" <lists@eitanadler.com>
10 years agoem/emx: Unbreak vlan settings
Sepherosa Ziehau [Thu, 30 May 2013 12:33:21 +0000 (20:33 +0800)]
em/emx: Unbreak vlan settings

Obtained-from: FreeBSD

10 years agobce.4: Fix wording and typos in a number of places.
Sascha Wildner [Thu, 30 May 2013 09:55:55 +0000 (11:55 +0200)]
bce.4: Fix wording and typos in a number of places.

10 years agovmstat: Update man page for the -v
Sepherosa Ziehau [Thu, 30 May 2013 09:57:32 +0000 (17:57 +0800)]
vmstat: Update man page for the -v

10 years agobnx: Add comment about how the RSS redirect table is configured
Sepherosa Ziehau [Thu, 30 May 2013 09:52:10 +0000 (17:52 +0800)]
bnx: Add comment about how the RSS redirect table is configured

10 years agobce: Update man page
Sepherosa Ziehau [Thu, 30 May 2013 09:48:50 +0000 (17:48 +0800)]
bce: Update man page

10 years agoevtranalyze(1): Move it to using ploticus from dports.
Sascha Wildner [Mon, 20 May 2013 19:00:00 +0000 (21:00 +0200)]
evtranalyze(1): Move it to using ploticus from dports.

10 years agokernel/kern_time.c: Mark the hack to not settimeofday(0) with XXX.
Sascha Wildner [Mon, 20 May 2013 18:54:59 +0000 (20:54 +0200)]
kernel/kern_time.c: Mark the hack to not settimeofday(0) with XXX.

10 years agoSwitch to /usr/local/... paths in several files.
Sascha Wildner [Mon, 20 May 2013 18:53:17 +0000 (20:53 +0200)]
Switch to /usr/local/... paths in several files.

10 years agoPoint to more neutral, yet dports biased directories from manual pages.
Sascha Wildner [Thu, 30 May 2013 08:27:16 +0000 (10:27 +0200)]
Point to more neutral, yet dports biased directories from manual pages.

Most of them are identical in pkgsrc.

10 years agocarp: Fix routes reset issue
Sepherosa Ziehau [Wed, 29 May 2013 12:41:40 +0000 (20:41 +0800)]
carp: Fix routes reset issue

Before this commit, routes related to carp or carp backing device were
reset, i.e. only prefix route was left, when carp state changed, e.g.
carp is down.

This commit fixes this routes reset issue by replacing the carp or carp
device routes' rt_ifa and rt_ifp with proper ifaddr and ifnet, instead
of discarding the old routes and installing the new prefix route.

Reported-by: robgar
10 years agocarp: Take netmask into consideration when picking up backing address
Sepherosa Ziehau [Wed, 29 May 2013 09:36:08 +0000 (17:36 +0800)]
carp: Take netmask into consideration when picking up backing address

10 years agocarp: Perfer addresses with prefix route installed.
Sepherosa Ziehau [Mon, 27 May 2013 14:24:50 +0000 (22:24 +0800)]
carp: Perfer addresses with prefix route installed.

10 years agopkg_radd - update to also handle dports
Matthew Dillon [Thu, 30 May 2013 02:24:40 +0000 (19:24 -0700)]
pkg_radd - update to also handle dports

* Detect that dports has been installed.  dports takes priority over
  pkgsrc in this situation.

* For dports we just 'pkg install ...'.  The script also warns if the
  /usr/local/etc/pkg.conf file has not been installed.

10 years agonrelease - Set dports default, add dports defaults
Matthew Dillon [Wed, 29 May 2013 22:45:30 +0000 (15:45 -0700)]
nrelease - Set dports default, add dports defaults

* Default DPORTS_PATH to /usr/dports.

* Add dports defaults for the git build to match the git we intend to
  prepackage with the installation.

10 years agonrelease: Switch over to dports for all packages.
Sascha Wildner [Sun, 19 May 2013 12:12:42 +0000 (14:12 +0200)]
nrelease: Switch over to dports for all packages.

10 years agofix MXCSR default value
Markus Pfeiffer [Sat, 18 May 2013 14:56:47 +0000 (14:56 +0000)]
fix MXCSR default value

XEN fails to initialise its vcpus to behave like actual cpus. One
instance of this is that the MXCSR is not setup to the default
value documented in as documented in AMD64 Architecture
Programmer's Manual Volume 1: Application Programming, Section
Section 4.3.2

10 years agophantasia(6): Fix two operator precedence mistakes.
Sascha Wildner [Sun, 26 May 2013 19:59:37 +0000 (21:59 +0200)]
phantasia(6): Fix two operator precedence mistakes.

10 years agolibc/citrus: Remove unneeded check (n is never < 0).
Sascha Wildner [Sun, 26 May 2013 20:28:36 +0000 (22:28 +0200)]
libc/citrus: Remove unneeded check (n is never < 0).

10 years agolibc/citrus: Fix an assertion (& becomes &&).
Sascha Wildner [Sun, 26 May 2013 20:36:13 +0000 (22:36 +0200)]
libc/citrus: Fix an assertion (& becomes &&).

10 years agojme.4: Fix some wording and typos.
Sascha Wildner [Sun, 26 May 2013 12:27:41 +0000 (14:27 +0200)]
jme.4: Fix some wording and typos.

10 years agomrouted(8): Fix a wrong check that was always false.
Sascha Wildner [Sun, 26 May 2013 09:29:41 +0000 (11:29 +0200)]
mrouted(8): Fix a wrong check that was always false.

10 years agofetch(1): Fix a wrong check that was always false.
Sascha Wildner [Sun, 26 May 2013 09:29:02 +0000 (11:29 +0200)]
fetch(1): Fix a wrong check that was always false.

10 years agolibkvm: Remove a redundant check.
Sascha Wildner [Sun, 26 May 2013 09:27:16 +0000 (11:27 +0200)]
libkvm: Remove a redundant check.

10 years agosplit(1): Add -d which allows a numeric suffix instead of an alphabetic one.
Sascha Wildner [Sat, 25 May 2013 20:03:07 +0000 (22:03 +0200)]
split(1): Add -d which allows a numeric suffix instead of an alphabetic one.

Submitted-by: Eitan Adler <lists@eitanadler.com>
Taken-from:   FreeBSD (r250432, r250882)

10 years agosplit(1): Add missing static declarations.
Sascha Wildner [Sat, 25 May 2013 19:24:04 +0000 (21:24 +0200)]
split(1): Add missing static declarations.

Submitted-by: Eitan Adler <lists@eitanadler.com>
10 years agosplit(1): Retain previous error message.
Sascha Wildner [Sat, 25 May 2013 12:55:22 +0000 (14:55 +0200)]
split(1): Retain previous error message.

10 years agosplit(1): Use dehumanize_number(3) for -b.
Sascha Wildner [Sat, 25 May 2013 12:46:09 +0000 (14:46 +0200)]
split(1): Use dehumanize_number(3) for -b.

10 years agojme: Update manpage
Sepherosa Ziehau [Fri, 24 May 2013 09:38:43 +0000 (17:38 +0800)]
jme: Update manpage

10 years agoBring in a dports(7) manual page.
Sascha Wildner [Thu, 23 May 2013 19:18:03 +0000 (21:18 +0200)]
Bring in a dports(7) manual page.

It is based on FreeBSD's ports(7) manpage with some adjustments.

10 years agohier.7: Adjust date.
Sascha Wildner [Thu, 23 May 2013 19:11:18 +0000 (21:11 +0200)]
hier.7: Adjust date.

10 years agohier.7: Add some bits about /usr/dports and /usr/local.
Sascha Wildner [Thu, 23 May 2013 19:09:02 +0000 (21:09 +0200)]
hier.7: Add some bits about /usr/dports and /usr/local.

10 years agoAdd /usr/local/... to various paths.
Sascha Wildner [Mon, 20 May 2013 12:43:30 +0000 (14:43 +0200)]
Add /usr/local/... to various paths.

10 years agopolling: Update manpage
Sepherosa Ziehau [Thu, 23 May 2013 13:14:41 +0000 (21:14 +0800)]
polling: Update manpage

10 years agonetgraph7/iface: Second parameter to ifq_dequeue should be NULL
Sepherosa Ziehau [Thu, 23 May 2013 09:50:45 +0000 (17:50 +0800)]
netgraph7/iface: Second parameter to ifq_dequeue should be NULL

10 years ago802.11: vap's if_snd is _not_ ALTQ ready
Sepherosa Ziehau [Thu, 23 May 2013 09:37:42 +0000 (17:37 +0800)]
802.11: vap's if_snd is _not_ ALTQ ready

10 years agonetgraph7/source: ifnet.if_snd is not ifqueue
Sepherosa Ziehau [Thu, 23 May 2013 09:33:42 +0000 (17:33 +0800)]
netgraph7/source: ifnet.if_snd is not ifqueue

10 years agoifq: Expand IF queue operation macros
Sepherosa Ziehau [Thu, 23 May 2013 09:13:52 +0000 (17:13 +0800)]
ifq: Expand IF queue operation macros

This prepares for the byte based queue limit and "rough priority queues"

10 years agoip/udp: Make input source address and source port saving MPSAFE
Sepherosa Ziehau [Thu, 23 May 2013 07:29:24 +0000 (15:29 +0800)]
ip/udp: Make input source address and source port saving MPSAFE

Change the global variable udp_in, udp_in6 and udp_ip6 into stack variable
and passing them around.  This should unbreak applications which depend
on received datagrams' source address or source port.

10 years agoudp: Fix IP source address setting for multicast address bound socket (2)
Sepherosa Ziehau [Thu, 23 May 2013 05:35:07 +0000 (13:35 +0800)]
udp: Fix IP source address setting for multicast address bound socket (2)

Source address should _not_ be set to INADDR_ANY in udp_output(), which
will make udp_output() calculate wrong pseudo header checksum.  Instead
of letting IP to select the source address, we extend in_pcbladdr() to
always locate the laddr, and use this function to find the source address
in udp_output().

10 years ago<sys/cdefs.h>: Simplify the _Noreturn compatibility macro.
Sascha Wildner [Wed, 22 May 2013 18:15:23 +0000 (20:15 +0200)]
<sys/cdefs.h>: Simplify the _Noreturn compatibility macro.

Our g++ doesn't support [[noreturn]] yet. We might use [[gnu::noreturn]]
here for now, but thinking about it, simpler is better, so just make it
__dead2 for anything that doesn't claim to be C11.

Buildworld-breakage-originally-pointed-out-by: sephe
10 years agopf: Ask caller to recalculate packet hash, if nat/binat/rdr happens
Sepherosa Ziehau [Wed, 22 May 2013 13:27:41 +0000 (21:27 +0800)]
pf: Ask caller to recalculate packet hash, if nat/binat/rdr happens

This unbreaks redirect (rdr) to local address.

DragonFly-bug: http://bugs.dragonflybsd.org/issues/2133

10 years ago<sys/cdefs.h>: Fix buildworld until I understand it better.
Sascha Wildner [Wed, 22 May 2013 08:32:27 +0000 (10:32 +0200)]
<sys/cdefs.h>: Fix buildworld until I understand it better.

10 years agosocket: Extend SO_REUSEPORT to distribute workload to available sockets
Sepherosa Ziehau [Mon, 13 May 2013 13:48:10 +0000 (21:48 +0800)]
socket: Extend SO_REUSEPORT to distribute workload to available sockets

The idea is from Linux's recently added SO_REUSEPORT support from Google:
https://lwn.net/Articles/542629/
(thank aggelos@ for pointing it to me)

In DragonFly, SO_REUSEPORT is already supported.  However, the original
support only allows the first wildcard address bound socket or the last
non-wildcard address bound socket to receive input, e.g. accept(2) on TCP
socket or receive datagrams on UDP socket; the rest of the sockets bound
to the same port will _not_ get any input.

In this commit, we extend SO_REUSEPORT to allow all sockets bound to the
same address and same port to receive input based on the input packet's
hash, so the workload, e.g. accept(2) or datagram reception, could be
evenly distributed among different sockets (imagine each socket is
handled by one process/thread).  This extension could also reduce the
contention from user space on TCP listen socket's so_comp or UDP socket's
so_rcv, when it is compared with the traditinally and commonly used one
socket model.

The implementation details:
- Introduce inp_localgroup, which groups inpcbs bound to the same address
  and same port.
- Add inp_localgroup hash table to inpcbinfo.  This hash table is
  allocated only for protocols supporting SO_REUSEPORT extension.
  Currently only TCP and UDP support SO_REUSEPORT extension.
- When inpcb is inserted into inpcbinfo wildcard hash table, it is also
  inserted into the cooresponding inp_localgroup.
- Before locating inpcb from inpcbinfo wildcard hash table, we check
  inpcbinfo's inp_localgroup hash table first.  If there is a matching
  inp_localgroup, packet hash will be used to pick one of the inpcbs from
  the inp_localgroup, and this inpcb will be used for further processing
  on this packet.  Packet hash's bits (ncpus2_shift), which are used to
  dispatch packet to the proper netisr, are ignored, since they may
  introduce unfairness between inpcbs in the same inp_localgroup.
  Hash-threshold instead of modulo-N is used to pick the inpcb from the
  inpcbs in the same inp_localgroup (http://tools.ietf.org/html/rfc2992
  for hash-threshold and modulo-N).

 inp_localgroup
   hash table

  |    :     |
  +----------+      +--------------+      +--------------+
  |    79    |      |inp_localgroup|      |inp_localgroup|
  +----------+      +--------------+      +--------------+
  |    80    |----->|     *:80     |----->|192.168.2.1:80|
  +----------+      +--------------+      +--------------+
  |    81    |      |    inpcb1    |      |    inpcb4    |
  +----------+      +--------------+      +--------------+
  |    :     |      |    inpcb2    |<--+
                    +--------------+   |
                    |    inpcb3    |   |
                    +--------------+   |
                                       |  input SYN dst 10.0.0.1:80
                                       |
                                       |  15           3 2  0
                                       |  +-------------+---+
                                       |  |       hash      |
                                       |  +-------------+---+
                                       +--|<--  used -->| (ncpus == 8)

Limitation:
- Each inp_localgroup could hold at most 256 inpcbs, which probably
  should be enough.
- Jailed sockets will not be entered into inp_localgroup, since the
  original inpcb preference of in_pcblookup_hash() must be kept.
- Wildcard IPv4 mapped INET6 sockets will not be entered into
  inp_localgroup, since the original inpcb preference of
  in_pcblookup_hash() must be kept.
- If one of the sockets in the inp_localgroup is closed, e.g. the process
  handles the socket is crashed: For TCP, certain amount of TCP syncache
  may be dropped prematurely by syncache timeout and the sockets on the
  closed socket's so_comp are all closed.  For UDP, all of the datagrams
  on the closed socket's so_rcv are dropped.  However, these will happen
  even before this commit.

Sysctl nodes net.inet.tcp.reuseport_ext and net.inet.udp.reuseport_ext
are added to enable/disable this SO_REUSEPORT extension on TCP and UDP.
They are enabled by default.

10 years ago<stdlib.h>: Use _Noreturn for C11's quick_exit().
Sascha Wildner [Wed, 22 May 2013 04:53:17 +0000 (06:53 +0200)]
<stdlib.h>: Use _Noreturn for C11's quick_exit().

Taken-from: FreeBSD

10 years ago<sys/cdefs.h>: Add compatibility macros for C11's _Noreturn.
Sascha Wildner [Wed, 22 May 2013 04:52:08 +0000 (06:52 +0200)]
<sys/cdefs.h>: Add compatibility macros for C11's _Noreturn.

Taken-from: FreeBSD

10 years agotpm(4): Use __func__.
Sascha Wildner [Wed, 22 May 2013 03:07:01 +0000 (05:07 +0200)]
tpm(4): Use __func__.

10 years agotpm(4): Fix building with TPM_DEBUG.
Sascha Wildner [Wed, 22 May 2013 02:30:33 +0000 (04:30 +0200)]
tpm(4): Fix building with TPM_DEBUG.

10 years agointr: Fix comment
Sepherosa Ziehau [Wed, 22 May 2013 01:24:37 +0000 (09:24 +0800)]
intr: Fix comment

Reported-by: haesbaert@haesbaert.org
10 years agosili(4): Maximum I/O size is 256KB
François Tigeot [Sat, 4 May 2013 09:00:55 +0000 (11:00 +0200)]
sili(4): Maximum I/O size is 256KB

10 years agokernel: Add CLOCK_PROCESS_CPUTIME_ID (part 2)
François Tigeot [Tue, 21 May 2013 09:38:45 +0000 (11:38 +0200)]
kernel: Add CLOCK_PROCESS_CPUTIME_ID (part 2)

10 years agokernel: Add CLOCK_PROCESS_CPUTIME_ID
François Tigeot [Tue, 21 May 2013 08:45:13 +0000 (10:45 +0200)]
kernel: Add CLOCK_PROCESS_CPUTIME_ID

10 years agoixgbe: On transmit path, prepend the unconsumed mbuf to the if_snd
Sepherosa Ziehau [Tue, 21 May 2013 08:53:29 +0000 (16:53 +0800)]
ixgbe: On transmit path, prepend the unconsumed mbuf to the if_snd

DragonFly-bug: http://bugs.dragonflybsd.org/issues/2563

10 years agowhereis(1): Search /usr/dports too.
Sascha Wildner [Mon, 20 May 2013 12:17:10 +0000 (14:17 +0200)]
whereis(1): Search /usr/dports too.

10 years agokernel -- x86_64: Do not set reserved bits in CR3.
Aggelos Economopoulos [Mon, 20 May 2013 18:56:07 +0000 (20:56 +0200)]
kernel -- x86_64: Do not set reserved bits in CR3.

The x86-64 platform code was setting PG_V, PG_U, and PG_RW bits in the
CR3 register. While the bits were supposed to cleared, Intel and AMD
hardware were ignoring them. Other x86-64 implementations, in
particular the software emulator in Linux's KVM, do check that these
reserved bits are zero.

Fixes issue running DragonFly x86_64 on KVM hosts without
two-dimensional (nested) paging.

Tested on a variety of real hardware (AMD FX(tm)-8150, c2q 6600, others)
and VM configurations (KVM on Intel/AMD hosts, Xen).

Committing-on-behalf-of: Venkatesh Srinivas <vsrinivas@ops101.org>
Reported-by: aggelos@, c.turner1, others.
Testing-by: aggelos@, swildner@, mneumann@, ftigeot@, profmakx@, Enjolras
Bug: 2561

10 years agosyncache: Avoid unnecessary tcpcb checking during syncache dropping
Sepherosa Ziehau [Mon, 20 May 2013 13:55:41 +0000 (21:55 +0800)]
syncache: Avoid unnecessary tcpcb checking during syncache dropping

10 years agosyncache: Avoid NULL accessing to tcpcb of the to-be-dropped syncache
Sepherosa Ziehau [Mon, 20 May 2013 13:44:32 +0000 (21:44 +0800)]
syncache: Avoid NULL accessing to tcpcb of the to-be-dropped syncache

It is possible that the syncache tcpcb is NULL when overflow happens,
e.g. the corresponding listen socket was closed but the timeout has
not recollected the staled syncache yet.

10 years agosetkey(8): Use '#!/usr/bin/env' to find perl in a script.
Sascha Wildner [Mon, 20 May 2013 09:40:14 +0000 (11:40 +0200)]
setkey(8): Use '#!/usr/bin/env' to find perl in a script.

10 years agoinstaller: Remove pnpinfo configuration option.
Sascha Wildner [Sun, 19 May 2013 14:05:10 +0000 (16:05 +0200)]
installer: Remove pnpinfo configuration option.

pnpinfo(8) is i386 only. Also, it's easy enough to review it by logging
in as root.

Suggested-by: ftigeot
10 years agoRemove /usr/pkg/xorg/... and /usr/X11R6/... from various paths/manpages.
Sascha Wildner [Mon, 20 May 2013 06:40:57 +0000 (08:40 +0200)]
Remove /usr/pkg/xorg/... and /usr/X11R6/... from various paths/manpages.

10 years agomsk: Disable MSI by default.
Sepherosa Ziehau [Mon, 20 May 2013 08:43:39 +0000 (16:43 +0800)]
msk: Disable MSI by default.

For certain chips, enabling it will cause watchdog timeout and the chip
may not be able to work again w/o rebooting.

Reported-by: ferz
10 years agoUse '#!/usr/bin/env' to find perl in some scripts.
Sascha Wildner [Sun, 19 May 2013 16:18:58 +0000 (18:18 +0200)]
Use '#!/usr/bin/env' to find perl in some scripts.

10 years agobsd-family-tree: Sync with FreeBSD.
Sascha Wildner [Sat, 18 May 2013 10:48:47 +0000 (12:48 +0200)]
bsd-family-tree: Sync with FreeBSD.

10 years agobmake: Fix wildcard srcs for phony targets
John Marino [Sat, 18 May 2013 20:48:24 +0000 (22:48 +0200)]
bmake: Fix wildcard srcs for phony targets

Bug fix created by Simon G. at BSDcan 2013 when Baptiste mentioned the
incompatiblity with legacy make seen during adding support to ports for
bmake.  There is no impaet for world/kernel builds.

Taken-from: FreeBSD SVN 250773 (18 May 2013)

10 years agohammer2 - freemap part 2 - cleanup & performance pass
Matthew Dillon [Sat, 18 May 2013 01:17:47 +0000 (18:17 -0700)]
hammer2 - freemap part 2 - cleanup & performance pass

* Increase minimum I/O from 1K to 16K (HAMMER2_LBUFSIZE).

* Adjust some use cases, increasing the smallest indirect block to the
  minimum IO size 4K->16K.

* The BREF_TYPE_FREEMAP_LEAF bitmap is now embedded in the chain, allowing
  us to use the 256 byte bitmaps more safely.  As with inodes, a read-in
  involves using a larger buffer-cache buffer and then copying the data
  into the chain.

* Avoid unnecessary reads from disk when allocating blocks that are less
  than the minimum IO size.  If it is determined that the bitmap bits
  covering the minimum IO size are 0 (unallocated), we pre-validate the
  larger buffer cache buffer so the later bread() does not have to issue
  any actual reads.

  Pre-validation for allocations larger than or equal to the minimum IO
  size is already handled in the chain locking code.

  With this change, a cpdup into H2 will issue mostly writes and is able
  to avoid nearly all reads.

* Make some progress formalizing chain-embedded data.

10 years agolvm: Fix two wrong array indexes.
Sascha Wildner [Sat, 18 May 2013 01:16:29 +0000 (03:16 +0200)]
lvm: Fix two wrong array indexes.

Both files are not used by us. Just in case someone wants to play with
them.

10 years agohammer2 - freemap part 1 - initial block allocator and media support
Matthew Dillon [Fri, 17 May 2013 21:48:59 +0000 (14:48 -0700)]
hammer2 - freemap part 1 - initial block allocator and media support

* Freemap document (FREEMAP in this directory)

* temporarily turn off clustering until the freemap gets that capability
  (mixed buffer sizes can be adjacent atm).

* Remove the freemap_blockref[1] from the volume header and replace it
  with a blockset array (8 blockrefs).

* Implement dynamic creation of freemap nodes and leafs on an as-needed
  basis using the normal indirect block creation code.  Most of the standard
  file handling code is reused for the freemap support.

* Major cleanup of hammer2_chain.c, the duplication code, the indirect
  block creation and handling, and the chain->flag handling.

10 years agokernel: Add the tpm(4) driver for trusted platform modules.
Sascha Wildner [Wed, 15 May 2013 18:19:18 +0000 (20:19 +0200)]
kernel: Add the tpm(4) driver for trusted platform modules.

Tested-by: tuxillo on a HP ProBook 6460b
Taken-from: FreeBSD

10 years agoUpdate the pciconf(8) database.
Sascha Wildner [Wed, 15 May 2013 14:32:30 +0000 (16:32 +0200)]
Update the pciconf(8) database.

May 14, 2013 snapshot from http://pciids.sourceforge.net/

10 years agokernel - Fix devfs deadlock
Matthew Dillon [Tue, 14 May 2013 17:44:36 +0000 (10:44 -0700)]
kernel - Fix devfs deadlock

* Fix a devfs deadlock against getnewvnode() due to the devfs master
  lock being held.

* Most evident on 32-bit builds because 64-bit builds don't recycle vnodes
  as quickly.

Reported-by: marino
Analysis-by: vsrinivas
10 years agotop(1): Remove whitespace from local modifications
John Marino [Tue, 14 May 2013 10:35:53 +0000 (12:35 +0200)]
top(1): Remove whitespace from local modifications

This only cleans up code we added, there are no functional changes.

10 years agotop(1): Support wider terminals (Bug 2448)
John Marino [Tue, 14 May 2013 10:21:30 +0000 (12:21 +0200)]
top(1): Support wider terminals (Bug 2448)

Bump MAX_COLS from value of 255 to 512 to support wider terminals.
A similar change was also done on FreeBSD 5 months ago (r244180)

Reported-by: Charles Rapenne
https://bugs.dragonflybsd.org/issues/2448

10 years agohammer2 - flush sequencing part 8 - stabilization pass
Matthew Dillon [Mon, 13 May 2013 03:44:32 +0000 (20:44 -0700)]
hammer2 - flush sequencing part 8 - stabilization pass

* On this commit it appears that the cpdup / test is fully validating
  on remount and chain memory leaks are gone.

* Remove a hack when creating a hardlink.  The original directory entry
  is duplicated to create the invisible hardlink target in the common
  parent directory, but the original directory entry is then not deleted.
  Instead I was modifying it (which generally did not cause a delete/duplicate
  sequence) and then changing the inode type to HARDLINK and setting
  the OPFLAG_DIRECTDATA flag.

  The problem with this is that the inode's core RBTREE was left intact,
  but as a DIRECTDATA inode the flusher ignores it.  This prevented the
  flusher from clearing the MOVED but on the children and resulted in the
  memory leak.

  What I do now is delete/duplicate the original inode, give the duplicate
  a fresh core, and then modify the duplicate instead of the original to be
  the special HARDLINK type w/OPFLAG_DIRECTDATA.  This removes the special
  case.

10 years agohammer2 - Add 'hash' directive
Matthew Dillon [Mon, 13 May 2013 03:16:45 +0000 (20:16 -0700)]
hammer2 - Add 'hash' directive

* Add hammer2 hash <filename>* which calculates and prints out the
  64-bit directory hash code for a filename, for debugging purposes.

10 years agohammer2 - flush sequencing part 7 - stabilization pass
Matthew Dillon [Mon, 13 May 2013 03:13:04 +0000 (20:13 -0700)]
hammer2 - flush sequencing part 7 - stabilization pass

* Simplify the next_parent / IPACTIVE handling.  Just ref next_parent
  unconditionally, it's the easiest solution.

* More work on CHAIN_SUBMODIFIED flag handling during the flush.  The
  flush seems to catch all the edge cases now (cross fingers).

* Do a better job cleaning up unreferenced chains.

10 years agoless: Update to version 458
John Marino [Sat, 11 May 2013 20:16:21 +0000 (22:16 +0200)]
less: Update to version 458

Version 458 was released on 4 APR 2013.  Differences since version 451:
  * Allow backslash escaping of metacharacters in LESS environment
    variable after the --use-backslash option.
  * Don't quit if syntax errors are found in command line options.
  * Increase sizes of some internal buffers.
  * Fix crash with "stty rows 0".
  * Fix display bug when using up/down arrow on the command line.

Version 451 was released on 4 SEP 2012.  Differences since version 444:
  * Add ESC-F command to keep reading data until a pattern is found.
  * Use exit code of LESSOPEN script if LESSOPEN starts with "||".
  * When up/down arrow is used on the command line immediately after
    typing text, the next command starting with that text is found.
  * Add support for GNU regex.
  * Add configure option --with-regex=none and fix compile errors
    when compiling with no regex library.
  * Fix possible crashes caused by malformed LESSOPEN or
    LESSCLOSE variables.
  * Fix bug highlighting text which is discontiguous in the file
    due to backspace processing.
  * Fix bug in displaying status column when scrolling backwards
    with -J and -S in effect.

10 years agoMerge branch 'vendor/LESS'
John Marino [Sat, 11 May 2013 20:50:00 +0000 (22:50 +0200)]
Merge branch 'vendor/LESS'

10 years agoUpdate less from version 444 to 458 on the vendor branch avalon/vendor/LESS
John Marino [Sat, 11 May 2013 20:01:33 +0000 (22:01 +0200)]
Update less from version 444 to 458 on the vendor branch

10 years agolibedit: Update to version 2012-12-13
John Marino [Sat, 11 May 2013 18:52:10 +0000 (20:52 +0200)]
libedit: Update to version 2012-12-13

There have been three releases since libedit was imported as a vendor
branch, but the changelog is simply "sync with NetBSD" for each one.

The main item of interest is that widechar support has been added
for real this time.  Previously all the man pages were in place but
the library didn't actually have the support.

A minor item of note is that NetBSD finally implemented the
rl_completion_word_break_hook which reduces the number of files
with local modifications.

10 years agoMerge branch 'vendor/LIBEDIT'
John Marino [Sat, 11 May 2013 19:34:39 +0000 (21:34 +0200)]
Merge branch 'vendor/LIBEDIT'

Conflicts:
contrib/libedit/src/editline/readline.h
contrib/libedit/src/readline.c

10 years agoUpdate libedit from version 2012-03-11 to 2012-12-13 on vendor branch avalon/vendor/LIBEDIT
John Marino [Sat, 11 May 2013 08:40:20 +0000 (10:40 +0200)]
Update libedit from version 2012-03-11 to 2012-12-13 on vendor branch

10 years agotcsh: Update from version 6.17.00 to 6.18.01
John Marino [Fri, 10 May 2013 22:19:15 +0000 (00:19 +0200)]
tcsh: Update from version 6.17.00 to 6.18.01

There were 8 releases since the last tcsh update.
The changes of each are listed below.

When the output of "csh --version" is compared to the previous version,
two differences are noticed.  The first is dpsm is not showing.  This is
correct because it cannot be set simultaneously with widestar as it was.
The second difference is the system malloc is no longer used.  The
sources inside say system malloc can be significantly slower and that
memory statistics will not be available if used.  It also went to pains
to remove the option even if hard-coded in config_p.h.

The identifier for --version was fixed for x86_64 platform by
updating host.defs file.

V6.18.01 - 20120214
  5. fix interruptible wait again
  4. ignore bogus compiler overflow message
  3. cleanup ifdefs in utmp code, and provide default array entries
  2. Ignore #machine entries in host.defs
  1. Detect missing ) in gethost.c (Corinna Vinschen)

V6.18.00 - 20120114
103. remove unused variables.
102. Make gethost use definitions for x __x__ and __x automatically.
101. More utmp fixes
100. V6.17.10 - 20120105
 99. Add more FreeBSD/NetBSD machines
 98. Add portability wrapper for gencat
 97. Fix warning for write in SYSMALLOC systems.
 96. V6.17.09 - 20120102
 95. revert gencat handling to pre-cygwin fixes (without env settings)
 94. remove stray endutent()
 93. V6.17.08 - 20111230
 92. Remove - from gencat
 91. Provide support for malloc_usable_size() so that linux works again
     without SYSMALLOC
 90. Add support for FreeBSD's utmpx.

V6.17.07 - 20111227
 88. Fix debian bug #645238: tcsh segfaults when prompt includes %j and
     there are more than 10 jobs.
 87. PR/155: Default $anyerror to set for backward compatibility
 86. PR/149: Don't print -1 in %j (Vojtech Vitek)
 85. handle -- on chdir commands as the end of options processing so that
     they can process a directory like -x without resorting to ./-x
     (Andrew Stevenson)
 84. Handle write(2) returning ENOENT from SoFS, thanks ++HAL (R. Byrnes)
 83. PR/38: Null check for jobs (Kurt Miller)
 82. Fix spelling correction correcting ./foo -> ../foo2 (jean-luc leger)
 81. PR/120: string0 in filetest does not have enough space.
 80. V6.17.06 - 20110415
 79. PR/110: Add $anyerror to select behavior. Default to the new one.
 78. Don't try to spell commands that are correct (Rouben Rostamian)
     [./tcsh -f; set path=($path 2); mkdir foo2; cd foo2; touch foo;
      chmod +x foo; set correct=cmd; ./foo -> ../foo]
 77. Don't push syntax struct on the cleanup stack, because on foo;bar
     if foo fails, we will free bar prematurely (Ben Miller)
 76. Avoid infinite loop while trying to print pid of a dying process
     to a closed file (Bob Arendt)
 75. Handle completion of ${ variables (Anthony Mallet)
 74. Add --disable-nls-catalogs (Corinna Vinschen)
 73. convert message catalogs to UTF-8 (Werner Fink)
 72. check that the NLS path works before setting $NLSPATH.
 71. use SYSMALLOC for GLIBC (Werner Fink)
 70. use mallinfo for SYSMALLOC (Corinna Vinschen)

V6.17.05 - 20110201
 68. Use mkstemp() if there for here docs (Werner Fink)
 67. Fix handling of errors and exit values in builtins (Werner Fink)
 66. Better pty name detection (Werner Fink)
 65. Enable NLS catalogs on Cygwin (Corinna Vinschen)
 64. NLSPATH handling fixes (Corinna Vinschen)
 63. Avoid infrequent exit when tcsh cd's into a non-existent directory
     https://bugzilla.novell.com/show_bug.cgi?id=293395 (Werner Fink)
 62. Don't try to spell check full path binaries that are correct because
     they can cause hangs when other nfs partitions are hung. (W. Fink)
 61. Avoid nested interrupts when exiting causing history writing to fail
     https://bugzilla.novell.com/show_bug.cgi?id=331627 (Werner Fink)
 60. Instead of giving an error or ignoring lines with missing eol at eof,
     process them.
 59. Avoid leaking fd's in mail check (Werner Fink)
 58. Add cygwin_xcrypt() (Corinna Vinschen)
 57. Recognize i686 (Corinna Vinschen)
 56. Rename cygwin32 to cygwin and bring it up-to-date with modern cygwin
     settings (Corinna Vinschen)
 55. Avoid double slashes in cdpath (Corinna Vinschen)

V6.17.04 - 20110118
 53. Revert PR/110, breaks the test suite.

V6.17.03 - 20110117
 51. PR/102: Complain on input files with missing trailing \n
 50. PR/104: If atime == mtime we don't have new mail.
 49. PR/113: Don't allow illegal variable names to be set.
 48. PR/112: don't set $REMOTEHOST on the local machine.
 47. PR/110: exit status of the pipeline should be status of last command.
 46. Android support (Corinna Vinschen)
 45. Add AUTOSET_KANJI which works around the Shift-JIS encoding that
     translates unshifted 7 bit ASCII (Werner Fink)
 44. Handle mb{r,}towc() returning 0 by setting the return value to NUL
     (Jean-Luc Leger)
 43. PR/109: make wait interruptible (Vojtech Vitek)
 42. resource limit fixes: signed vs. unsigned, megabyte issue, doc issues
     (Robert Byrnes)
 41. remove .bat and .cmd handling for executables on cygwin (C. Vinschen)
 40. Don't echo history while history -L or history -M
 39. Check for EOS before ** from Greg Dionne
 38. Don't fork in backeval from Bryan Mason
 37. Better globstar support from Greg Dionne
 36. Error out when processing the last incomplete line instead of
     silently ignoring it (Anders Kaseorg)
 35. Fix SEGV from echo ``
 34. Better fixes for histchars and promptchars (nargs)
 33. Fix win32 issue calling fmalloc/ffree from non-thread-safe context.
     (Fabio Fabbri)

V6.17.02 - 20100512
 31. PR/79: nargs: Better handling for promptchars.
 30. PR/97: Add parseoctal to retain compatibility with previous versions
     (Jim Zajkowski)
 29. PR/84: Performance fixes for large history merges (add
     hashtable (Ted Anderson)
 28. Revert previous #23; people should use $histlit if they want this
     feature.
 27. Don't kill "hup" background jobs when a child of the shell exits.
     From Debian.
 26. Ignore \r\n in the command line options for OS's that don't strip
     these from #!; from Debian
 25. Fix enhanced missing patch (Greg Dionne)
 24. Callers of rt_mbtowc don't grok -2 as a return. Return -1 for now.
     (Corinna Vinschen)
 23. Turn HistLit on while recording history to avoid \!\! losing its \.
     From Debian
 22. set autoexpand; set histchars="";\n<tab> crash. From Debian

V6.17.01 - 20100506
 20. unset verbose while we are reading the history file to avoid echoing
     to the terminal. (Jeffrey Bastian)
 19. globstar addition, Enhance addition, euid, euser, gid variables
     (Greg Dionne)
 18. Make 'e' in vi mode work like 'b' - use wordchars (Alistair Crooks)
 17. Handle UTF-16 surrogates (Corinna Vinschen)
 16. Make tcsh work on systems where sizeof(wchar_t) == 2 (C. Vinschen)
 15. Better support for Solaris >= 2.9 (Thomas Uhle)
 14. Change internal expression calculations to long long so that we can
     deal with > 32 bit time, inodes, uids, file sizes etc.
 13. Add new linux resource limits.
 12. Don't print 'Exit X' when printexitvalue is set in `` expressions
     (Jeff Bastian)
 11. Add more LS_COLORS vars (M.H. Anderson)
 10. Reduce whitespace in Makefile (Don Estabrook)
  9. Manual page fixes (Alan R. S. Bueno)
  8. Remove history in loops bug from the documentation (Holger Weiss)
  7. Add autorehash (Holger Weiss)
  6. Add history.at (Ted Anderson)
  5. Better NLSPATH handling (Norm Jacobs)
  4. Fix hostname building from utmp (Cyrus Rahman)
  3. Handle pending signals before flush so that the the history file
     does not get truncated.  (Ted Anderson)
  2. Fix AsciiOnly setting that broke 8 bit input. (Juergen Keil)
  1. remember to closedir in mailchk (from Werner Fink, reported by
     David Binderman)

10 years agotcsh: Add more local modifications
John Marino [Fri, 10 May 2013 23:19:36 +0000 (01:19 +0200)]
tcsh: Add more local modifications

- Remove whitespace from existing local modifications of tcsh.
- Remove two unused variables which break the build with -Werror.
- Disable format warning completely because every xprintf with %S
  parameter breaks the build (it wants the argument to be cast to
  wchar_t* rather than the provided Char*).

10 years agoMerge branch 'vendor/TCSH'
John Marino [Sat, 11 May 2013 01:29:13 +0000 (03:29 +0200)]
Merge branch 'vendor/TCSH'

Conflicts:
contrib/tcsh-6/sh.decls.h

10 years agoUpdate tcsh from 6.17.00 to 6.18.01 on the vendor branch avalon/vendor/TCSH
John Marino [Fri, 10 May 2013 21:13:06 +0000 (23:13 +0200)]
Update tcsh from 6.17.00 to 6.18.01 on the vendor branch

10 years agoAdd option 'dmesg -c' which clears the kernel buffer after it is printed.
Eitan Adler [Fri, 10 May 2013 18:24:39 +0000 (14:24 -0400)]
Add option 'dmesg -c' which clears the kernel buffer after it is printed.

Tested by: swildner

10 years agohammer2 - flush sequencing part 6 - stabilization pass
Matthew Dillon [Fri, 10 May 2013 09:54:16 +0000 (02:54 -0700)]
hammer2 - flush sequencing part 6 - stabilization pass

* Fix bug when chains are e.g. delete/duplicated where a flush can occur
  out of order and retire more recent chain structures leaving older
  CHAIN_DELETED structures behind.  This caused the merged chain_find
  and lookup/iteration code to improperly believe a slot was empty when
  in fact the parent's bref array had a valid blockref.

  Fixed by flagging the discrete chain->next_parent linkages with
  CHAIN_IPACTIVE and adding a ref to the chain, which prevents them
  from being retired out of order.  This is currently being done
  unconditionally (and probably has to be done unconditionally).

* Fix bug related to the clearing of SUBMODIFIED during a flush.  Generally
  speaking a flush pass clears SUBMODIFIED if no children were deferred.

  The bug is that higher-level indirect-block chains closer to the root
  are typically only modified during the flush as the deeper chains are
  flushed recursively and rolled up into the parents on the way back up.
  Because of this, these higher-level chains could represent more than one
  flush synchronization point.  When this situation is detected we now
  set SUBMODIFIED here too.

* Consolidate ip->chain adjustments into the hammer2_inode_repoint()
  procedure.  Remove hammer2_inode_put().

* Cleanup some #if 0'd code that I won't be using.

10 years agoUpdate dutch calendar
Eitan Adler [Thu, 9 May 2013 04:40:23 +0000 (00:40 -0400)]
Update dutch calendar

On 30 April 2013 queen Beatrix resigned and crownprince Willem Alexander
became the new king. King's day is on 27 April.

Obtained From: FreeBSD (r250198)

10 years agoAdd "SECURITY CONSIDERATIONS" to the mdoc template
Eitan Adler [Tue, 7 May 2013 01:07:31 +0000 (21:07 -0400)]
Add "SECURITY CONSIDERATIONS" to the mdoc template

Obtained from: FreeBSD

10 years agobnx: Use different RX coalesce BDs for polling and interrupt mode
Sepherosa Ziehau [Fri, 10 May 2013 07:08:52 +0000 (15:08 +0800)]
bnx: Use different RX coalesce BDs for polling and interrupt mode

The value set by this commit for polling mode improves tiny packets
forwarding performance by +250Kpps in normal mode and +120Kpps in
fast mode.

10 years agohammer2 - flush sequencing part 5 - more flush synchronization work
Matthew Dillon [Fri, 10 May 2013 04:03:01 +0000 (21:03 -0700)]
hammer2 - flush sequencing part 5 - more flush synchronization work

* Get rid of chain->parent, replacing it with chain->above which is a
  pointer to the core common to the possibly multiple parents.  Due
  to the multi-parenting, chain->parent was rather ad-hoc so getting
  rid of makes the code more clear.

* Adjust several APIs which used to take a locked parent of chain to
  instead take the core common to multiple parents of chain.

* Rework how CHAIN_MOVED is cleared.  The code works better but still
  has bugs which can leave chains hanging and unflushed on umount.

* Rework the lastdrop function significantly.

* Continue working on automatic delete/duplicate operation when a
  modification crosses a synchronization boundary.  This code is now
  mostly implemented.

* Continue working on the flush filter which is responsible for
  differentiating modifications made before and after the synchronization
  point.  The filter is now mostly implemented.

* Use spinlock protection on the rbtree, allowing manipulation of children
  without having to lock a specific parent chain (which wouldn't help much
  anyway since there can be more than one parent).

* Fix numerous assertions and panics.

10 years agobnx: In polling mode, force chip update status block for status changes
Sepherosa Ziehau [Thu, 9 May 2013 13:59:11 +0000 (21:59 +0800)]
bnx: In polling mode, force chip update status block for status changes

If the status block updating is not forced, we will always see staled
status changes in polling mode, which causes bunch of unnecessary register
reading.

For status changes sharing status block with transmission, staled status
changes probably won't linger for too much time, since any data transmit
completion will cause status block to be updated.  However, for status
changes using its own status block, staled status changes will be there
until the chips are stopped.

10 years agobnx: Optimize RX STD ring refilling scheduling
Sepherosa Ziehau [Wed, 8 May 2013 01:42:58 +0000 (09:42 +0800)]
bnx: Optimize RX STD ring refilling scheduling

At the end of the RX RET ring interrupt, the RX STD ring refilling is
scheduled only when the number of consumed RX BDs are more then half of
the RX STD ring size (256).

This reduces the IPI rate on CPU that performs the RX STD ring refilling
from ~17000ipis/s to ~4000ipis/s on the system with heavy network loading.

10 years agoBring usb-hid-messages up to date
Eitan Adler [Tue, 7 May 2013 01:04:59 +0000 (21:04 -0400)]
Bring usb-hid-messages up to date

Obtained from: FreeBSD

10 years agodevd: Simplify handling of romeo_must_die
Eitan Adler [Mon, 6 May 2013 21:29:48 +0000 (17:29 -0400)]
devd: Simplify handling of romeo_must_die

Obtained from: FreeBSD

10 years agodevd: Don't call string() explicitly
Eitan Adler [Mon, 6 May 2013 21:29:03 +0000 (17:29 -0400)]
devd: Don't call string() explicitly

Obtained from: FreeBSD