dragonfly.git
11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Wed, 13 Jun 2012 19:23:27 +0000 (12:23 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agoigb: Fix RSS redirect table setting
Sepherosa Ziehau [Wed, 13 Jun 2012 13:43:06 +0000 (21:43 +0800)]
igb: Fix RSS redirect table setting

Allow debug code to force RX ring count

11 years agoigb: Main serializer should be enough to protect link status
Sepherosa Ziehau [Wed, 13 Jun 2012 11:15:00 +0000 (19:15 +0800)]
igb: Main serializer should be enough to protect link status

11 years agolibrefuse: Comment out all functions we don't (yet) have and add MLINKS.
Sascha Wildner [Wed, 13 Jun 2012 10:37:34 +0000 (12:37 +0200)]
librefuse: Comment out all functions we don't (yet) have and add MLINKS.

11 years agolibrefuse: Makefile cleanup.
Sascha Wildner [Wed, 13 Jun 2012 10:32:22 +0000 (12:32 +0200)]
librefuse: Makefile cleanup.

11 years agoigb: Enable multiple RX rings and integrate it w/ DragonFly's RSS
Sepherosa Ziehau [Wed, 13 Jun 2012 05:51:21 +0000 (13:51 +0800)]
igb: Enable multiple RX rings and integrate it w/ DragonFly's RSS

11 years agohammer2 - Implement and test first SPAN message transaction.
Matthew Dillon [Wed, 13 Jun 2012 05:46:13 +0000 (22:46 -0700)]
hammer2 - Implement and test first SPAN message transaction.

* The hammer2 VFS now sends a dummy SPAN message to the hammer2 service
  daemon.  SPANs are used to register capabilities (primarily PFS services
  and PFS consumers).  SPAN messages are left as open transactions for the
  duration of the link and/or when the graph changes (mainly a spanning
  tree mechanic that will be coded as a function of the hammer2 service
  daemon in userland.

* Basic open transaction and simple reply message tested.  Use a dummy
  message for testing.

* hammer2_msg_write() detects CREATE, allocates state, and assigns a
  msgid.  state allocation moved out of hammer2_state_msgtx() and
  into hammer2_msg_write() so we can calculate the proper CRCs.

* Fixed a couple of expected bugs.  The userland code was swapping
  msg_hdr.source and msg_hdr.target in the reply, but I adjusted the
  message spec to NOT do that (meaning any message routing has to select
  {source} or {target} based on whether the REPLY bit is set or not.

* Memory seems to get cleaned up properly, so far.

11 years agoethernet: Use atomic operation to update RSS related stats
Sepherosa Ziehau [Wed, 13 Jun 2012 05:05:24 +0000 (13:05 +0800)]
ethernet: Use atomic operation to update RSS related stats

11 years agohammer2 - wire up msg transaction state machine
Matthew Dillon [Wed, 13 Jun 2012 01:43:32 +0000 (18:43 -0700)]
hammer2 - wire up msg transaction state machine

* Wire up the msg transaction state machine.  Split hammer2_msg into
  hammer2_state and hammer2_msg.  Track states in two RB trees in the
  hammer2_pfsmount structure.

  Handle CREATE, DELETE, ABORT, and REPLY flags.

* Revamp the API.  The adjustments make it less likely that messages can
  be left dangling.

* Compile only, untested, not yet operational.

11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Wed, 13 Jun 2012 01:42:27 +0000 (18:42 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agoigb: Split RX and TX serializer
Sepherosa Ziehau [Tue, 12 Jun 2012 11:03:18 +0000 (19:03 +0800)]
igb: Split RX and TX serializer

11 years agoigb: Function renaming
Sepherosa Ziehau [Tue, 12 Jun 2012 10:07:36 +0000 (18:07 +0800)]
igb: Function renaming

igb_dma_{alloc,free} do more than just allocate/free busdma stuffs

11 years agoigb: Move RX/TX descriptor count into ring struct
Sepherosa Ziehau [Tue, 12 Jun 2012 09:59:40 +0000 (17:59 +0800)]
igb: Move RX/TX descriptor count into ring struct

11 years agoigb: Remove unused field
Sepherosa Ziehau [Tue, 12 Jun 2012 09:40:26 +0000 (17:40 +0800)]
igb: Remove unused field

11 years agotest/cocci: Add a patch that reports checks of variable/field addresses.
Sascha Wildner [Tue, 12 Jun 2012 11:05:17 +0000 (13:05 +0200)]
test/cocci: Add a patch that reports checks of variable/field addresses.

Like:

int i;
...
if (&i)
   ...

Taken-from: Linux

11 years agoarcmsr(4): To check for sense data, use sense_len.
Sascha Wildner [Sat, 9 Jun 2012 07:56:39 +0000 (09:56 +0200)]
arcmsr(4): To check for sense data, use sense_len.

Checking the address of a variable or field is going to be always true.

11 years agojme: Don't allow lower 32bits of RX buffer's physical address to be 0
Sepherosa Ziehau [Tue, 12 Jun 2012 07:14:51 +0000 (15:14 +0800)]
jme: Don't allow lower 32bits of RX buffer's physical address to be 0

If lower 32bits of RX buffer's physical address is 0, it would break
hardware pending RSS information delivery detection on RX path.

11 years agojme: Fix the race on the RX path against hardware for jumbo frames
Sepherosa Ziehau [Tue, 12 Jun 2012 06:22:13 +0000 (14:22 +0800)]
jme: Fix the race on the RX path against hardware for jumbo frames

Hardware will not clear OWN bit except the first RX desc, so its
following RX desc's OWN bit should be cleared before set the OWN
bit on the first RX desc again, i.e. before the first RX desc get
reused.

11 years agojme: Don't reuse the RX descriptor if the RSS is not set by the hardware
Sepherosa Ziehau [Tue, 12 Jun 2012 06:04:17 +0000 (14:04 +0800)]
jme: Don't reuse the RX descriptor if the RSS is not set by the hardware

Reenable RSS; it is stable enough now.

11 years agojme: Utilize ifnet_serialize_array_ functions
Sepherosa Ziehau [Tue, 12 Jun 2012 03:47:36 +0000 (11:47 +0800)]
jme: Utilize ifnet_serialize_array_ functions

11 years agoemx: Utilize ifnet_serialize_array_ functions
Sepherosa Ziehau [Tue, 12 Jun 2012 03:09:48 +0000 (11:09 +0800)]
emx: Utilize ifnet_serialize_array_ functions

11 years agoifnet: Add ifnet_serialize_array_{enter,exit,try,assert}()
Sepherosa Ziehau [Tue, 12 Jun 2012 03:08:09 +0000 (11:08 +0800)]
ifnet: Add ifnet_serialize_array_{enter,exit,try,assert}()

Ease network device driver development

11 years agoVOP_LOOKUP.9: Fix a little coding mistake.
Sascha Wildner [Mon, 11 Jun 2012 16:42:23 +0000 (18:42 +0200)]
VOP_LOOKUP.9: Fix a little coding mistake.

11 years agoigb: Split RX/TX ring count
Sepherosa Ziehau [Mon, 11 Jun 2012 11:25:43 +0000 (19:25 +0800)]
igb: Split RX/TX ring count

Remove the unused igb_queue struct

11 years agotest/cocci: Add a patch that checks for various sizeof(<pointer>) issues.
Sascha Wildner [Mon, 11 Jun 2012 08:59:11 +0000 (10:59 +0200)]
test/cocci: Add a patch that checks for various sizeof(<pointer>) issues.

It will warn about either assigning the size of a pointer to a variable
or passing both <pointer> and sizeof(<pointer>) to a function. These
patterns almost always point to bugs.

Taken-from: Linux

11 years agore: Fix size of the bcopy when extracting ethernet address
Sepherosa Ziehau [Mon, 11 Jun 2012 08:30:49 +0000 (16:30 +0800)]
re: Fix size of the bcopy when extracting ethernet address

Reported-by: swildner@
11 years agojme: Reconfigure RSS when RX engine is stopped
Sepherosa Ziehau [Sun, 10 Jun 2012 15:40:40 +0000 (23:40 +0800)]
jme: Reconfigure RSS when RX engine is stopped

11 years agojme: Save physical address of RX buffer, which will be used upon error
Sepherosa Ziehau [Sun, 10 Jun 2012 15:04:41 +0000 (23:04 +0800)]
jme: Save physical address of RX buffer, which will be used upon error

11 years agojme: Set OWN bit on TX desc, only after the other information is setup
Sepherosa Ziehau [Sun, 10 Jun 2012 14:30:15 +0000 (22:30 +0800)]
jme: Set OWN bit on TX desc, only after the other information is setup

11 years agojme: Increase alignment of TX/RX descriptor ring to the cacheline size
Sepherosa Ziehau [Tue, 5 Jun 2012 14:24:35 +0000 (22:24 +0800)]
jme: Increase alignment of TX/RX descriptor ring to the cacheline size

Round up TX/RX ring size to cacheline size too.

11 years agokernel/ufs: Bring in a fix to ufsdirhash_hash() from FreeBSD.
Sascha Wildner [Sun, 10 Jun 2012 02:31:33 +0000 (04:31 +0200)]
kernel/ufs: Bring in a fix to ufsdirhash_hash() from FreeBSD.

"When looking for some extra data to include in the hash, use the
 address of the dirhash, rather than the first sizeof(struct dirhash *)
 bytes of the structure (which, thankfully, seem to be constant)."

While here, fix some typos in the comment.

In-discussion-with: thesjg, vsrinivas

11 years agoppp(8): Raise WARNS to 6.
Sascha Wildner [Sat, 9 Jun 2012 15:10:35 +0000 (17:10 +0200)]
ppp(8): Raise WARNS to 6.

11 years agoppp(8): Another little fix (for i386).
Sascha Wildner [Sat, 9 Jun 2012 14:25:15 +0000 (16:25 +0200)]
ppp(8): Another little fix (for i386).

11 years agousr.sbin/ppp: fix netgraph includes.
Nuno Antunes [Mon, 4 Jun 2012 04:55:16 +0000 (05:55 +0100)]
usr.sbin/ppp: fix netgraph includes.

If the WANT_NETGRAPH7 make variable is set, use includes from
netgraph7/*; otherwise use includes from netgraph/*. It is possible
to use ppp with netgraph7 for establishing pppoe connections starting
from this commit.

XXX: the ng_tty module has not been ported yet into netgraph7, so use
the include header from legacy netgraph for now. This is an ugly hack
but allows ppp to compile for now until ng_tty is ported.

Reported-by: Sacha Wildner <swildner@>
11 years agonetgraph7: ng_base: spl* -> crit_*
Nuno Antunes [Sat, 26 May 2012 18:12:56 +0000 (19:12 +0100)]
netgraph7: ng_base: spl* -> crit_*

11 years agonetgraph7: Dont register netisr for netgraph
Nuno Antunes [Sat, 21 Apr 2012 16:00:55 +0000 (17:00 +0100)]
netgraph7: Dont register netisr for netgraph

Netgraph7 has been converted to taskqueue in an earlier commit.
* Do not register netisr.
* Rename ngintr() to ngtask(), no functional change.

11 years agonetgraph: do not unconditionally load ng_ksocket module
Nuno Antunes [Fri, 20 Apr 2012 22:30:28 +0000 (23:30 +0100)]
netgraph: do not unconditionally load ng_ksocket module

Unconditionally loading ng_ksocket module was preventing correct operation
when compiling netgraph into the kernel (i.e. when not compiled as a
module).

11 years agoppp: Raise WARNS to 5.
Nuno Antunes [Tue, 27 Mar 2012 13:24:24 +0000 (14:24 +0100)]
ppp: Raise WARNS to 5.

Mostly-from: FreeBSD

11 years agokernel: Remove some bogus checks before returning anyway.
Sascha Wildner [Sat, 9 Jun 2012 11:18:39 +0000 (13:18 +0200)]
kernel: Remove some bogus checks before returning anyway.

11 years agoFix two wrong sizeof() usages.
Sascha Wildner [Sat, 9 Jun 2012 09:04:18 +0000 (11:04 +0200)]
Fix two wrong sizeof() usages.

It should be taking the size of the variable the pointer points to,
instead of the size of the pointer itself.

11 years agohammer2 - Wire-up the kernel<->userland messaging pipe
Matthew Dillon [Sat, 9 Jun 2012 05:03:48 +0000 (22:03 -0700)]
hammer2 - Wire-up the kernel<->userland messaging pipe

This commit starts coding up the cluster controller messaging
infrastructure.  The cluster controller is a userland program
typically running on the same machine (but doesn't have to be).

The controller will be able to act in several capacities ranging
from simple remote mounts with no local storage to mirroring setups,
master/slave setups, and ultimately quorum setups.  Since communication
is over a socket it will eventually be possible to implement a
diskless hammer2 root mount without the need for a local controller.

The VFS only talks over one socket, so in quorum or multi-connection
setups the local cluster controller will deal with the complexity of
managing multiple connections and the hammer2 VFS messaging interface
remains simple.

The hammer2 VFS will also use this interface to request cache state
grants and, being a two-way protocol, the other end can request cache
state invalidations or downgrades.

* hammer2_mount now starts 'hammer2 service', connects to it via a socket,
  and passes the socket descriptor to the mount().

* The hammer2 VFS now refs the passed-in file pointer and starts a reader
  and writer thread to manage it.  The code does not yet process actual
  messages.

11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Sat, 9 Jun 2012 01:20:17 +0000 (18:20 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agosys/boot: Raise WARNS to 2 and silence a warning.
Sascha Wildner [Fri, 8 Jun 2012 23:21:43 +0000 (01:21 +0200)]
sys/boot: Raise WARNS to 2 and silence a warning.

11 years agofwcontrol(8): Raise WARNS to 6 and fix warnings.
Sascha Wildner [Fri, 8 Jun 2012 21:43:40 +0000 (23:43 +0200)]
fwcontrol(8): Raise WARNS to 6 and fix warnings.

11 years agodconschat(8): Raise WARNS to 6 and fix warnings.
Sascha Wildner [Fri, 8 Jun 2012 20:25:21 +0000 (22:25 +0200)]
dconschat(8): Raise WARNS to 6 and fix warnings.

11 years agosensorsd(8): Raise WARNS to 6 and fix warnings.
Sascha Wildner [Fri, 8 Jun 2012 19:21:40 +0000 (21:21 +0200)]
sensorsd(8): Raise WARNS to 6 and fix warnings.

11 years agokernel: Remove some unused variables.
Sascha Wildner [Fri, 8 Jun 2012 18:08:40 +0000 (20:08 +0200)]
kernel: Remove some unused variables.

11 years agodlopen.3: Remove wrong .El
Sascha Wildner [Fri, 8 Jun 2012 13:57:36 +0000 (15:57 +0200)]
dlopen.3: Remove wrong .El

11 years agoPut getmntopts() into libutil and install mntopts.h to /usr/include.
Sascha Wildner [Fri, 8 Jun 2012 08:59:23 +0000 (10:59 +0200)]
Put getmntopts() into libutil and install mntopts.h to /usr/include.

Previously, they were private to sbin/mount and the other mount_*
commands would take them from there via their Makefiles.

However, puffs related stuff outside base (in pkgsrc for example)
couldn't reach them this way. So for now, arrange it like NetBSD
has it.

11 years agohammer2 - Integrate CCMS thread lock into hammer2 chain structure
Matthew Dillon [Fri, 8 Jun 2012 06:52:01 +0000 (23:52 -0700)]
hammer2 - Integrate CCMS thread lock into hammer2 chain structure

* Integrate the CCMS thread lock into the hammer2 chain structure.

* Implement shared and exclusive modes (hammer2 was only really using
  exclusive mode before).  Rework all the chain and inode locking functions
  to use CCMS via chain->cst.

  This also required changing the SPLAY trees into RB trees.

* Start reworking non-modifying VNOPS to use shared CCMS locks.

* Rework the hammer2_chain_drop() function to avoid deadlocks due to the
  mixed shared/exclusive locks we now support.

* Major performance improvements for concurrent access.  SHARED locks now
  extend to hammer2_chain and hammer2_inode structural accesses, recursions,
  and cached data (buffer cache) accesses.

  In particular, multiple threads can now access the same bp via a
  hammer2_chain locked shared.  The bp's themselves are still exclusive
  only (the kernel APIs haven't changed), but the hammer2_chain structure
  can now share the bp's data across several threads accessing it via the
  chain.

11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Fri, 8 Jun 2012 06:51:41 +0000 (23:51 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agoRemove doscmd(1).
Sascha Wildner [Fri, 8 Jun 2012 06:15:14 +0000 (08:15 +0200)]
Remove doscmd(1).

Whatever it is that people take for running MS-DOS stuff nowadays, we do
not need to maintain this in the base.

It was i386 only, too.

11 years agohammer2 - Change from splay -> red-black tree
Matthew Dillon [Thu, 7 Jun 2012 23:10:50 +0000 (16:10 -0700)]
hammer2 - Change from splay -> red-black tree

* Even though splay trees are faster they are not lookup-safe under a
  shared lock.  In order to consolidate the chain locks with the cache
  coherency state we need to make lookups shared-safe.

* This will allow me to move chain locks from exclusive to shared/exclusive
  with only modest surgery.

11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Thu, 7 Jun 2012 23:10:42 +0000 (16:10 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agokernel: Use hashdestroy() to free hash tables allocated with hashinit().
Sascha Wildner [Thu, 7 Jun 2012 17:19:09 +0000 (19:19 +0200)]
kernel: Use hashdestroy() to free hash tables allocated with hashinit().

It asserts that the table is empty before kfree()ing it.

11 years agoFix some unterminated quoted strings in several manual pages.
Sascha Wildner [Thu, 7 Jun 2012 10:26:45 +0000 (12:26 +0200)]
Fix some unterminated quoted strings in several manual pages.

11 years agokernel/drm: Use hashdestroy(). Unbreaks kernel build.
Sascha Wildner [Thu, 7 Jun 2012 07:23:09 +0000 (09:23 +0200)]
kernel/drm: Use hashdestroy(). Unbreaks kernel build.

11 years agokernel: Remove some unused variables.
Sascha Wildner [Thu, 7 Jun 2012 07:15:15 +0000 (09:15 +0200)]
kernel: Remove some unused variables.

11 years agohammer2 - Initial CCMS locking tie-in
Matthew Dillon [Thu, 7 Jun 2012 05:43:14 +0000 (22:43 -0700)]
hammer2 - Initial CCMS locking tie-in

This is a necessary precursor step to being able to integrate the cache
state grants with our chain locks.  Basically we are replacing the
hammer2 chain lockmgr lock (hammer2_chain->lk) with a CCMS cst structure
(hammer2_chain->cst).

This structure will become the attribute CST for hammer2 inodes.  The
topological CST is built into the hammer2_inode.  Data-space CSTs will
initially be the hammer2_chain->cst for indirect blocks though we will
probably also need one or more in hammer2_inode to handle generic casess.

11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Thu, 7 Jun 2012 05:42:56 +0000 (22:42 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agoUpdate the pciconf(8) database.
Sascha Wildner [Wed, 6 Jun 2012 21:23:26 +0000 (23:23 +0200)]
Update the pciconf(8) database.

May 7, 2012 snapshot from http://pciids.sourceforge.net/

11 years agokernel: Add <sys/hash.h>.
Sascha Wildner [Wed, 6 Jun 2012 20:11:44 +0000 (22:11 +0200)]
kernel: Add <sys/hash.h>.

* Our DRM's drm_priv_hash.h is really what's <sys/hash.h> in the other
  BSDs. So move it there, too.

* Add a hash(9) manual page (from FreeBSD).

* Adjust DRM to use our hash{init,destroy}() functions instead of
  rolling its own.

Reported-by: ftigeot
11 years agokernel: Add hashdestroy() (taken from FreeBSD).
Sascha Wildner [Wed, 6 Jun 2012 19:56:00 +0000 (21:56 +0200)]
kernel: Add hashdestroy() (taken from FreeBSD).

11 years agoMove hash.9 to hashinit.9.
Sascha Wildner [Wed, 6 Jun 2012 15:40:53 +0000 (17:40 +0200)]
Move hash.9 to hashinit.9.

11 years agobce: Configuable number of TX/RX descriptor pages
Sepherosa Ziehau [Wed, 6 Jun 2012 07:19:14 +0000 (15:19 +0800)]
bce: Configuable number of TX/RX descriptor pages

11 years agoigb: Use extended interrupt mode whenever possible
Sepherosa Ziehau [Sun, 3 Jun 2012 11:04:33 +0000 (19:04 +0800)]
igb: Use extended interrupt mode whenever possible

The extended interrupt mode could be used as long as the interrupt
is not shared.  MSI by definition is not shared.  For line interrupt,
hw.igbX.irq.unshared tunable is added; it could be set, if the igbX
does not share interrupt line with other devices.

The extended interrupt mode could deliver accurate information about
which queue is active, thus avoiding extra memory reading.

11 years agohammer2 - Initial CCMS adaptation and code-up
Matthew Dillon [Mon, 4 Jun 2012 03:47:45 +0000 (20:47 -0700)]
hammer2 - Initial CCMS adaptation and code-up

This is an initial code-up and compiles-without-error pass, untested and
likely full of bugs.

CCMS needed a makeover but I managed to retain the guts of the original
block/wakeup and CST partitioning code.

* The frontend code now creates a larger CCMS topology which will mirror
  the chain topology (the ccms_inode will be embedded in a hammer2_inode),
  and places the data ranging in ccms_inode.

* CCMS inode creation and deletion is broken up into two stages, e.g. a
  deletion requires a 'delete' plus 'uninit' sequence allowing the 'delete'
  to reflect a topological deletion but for the CCMS node to remain intact
  (e.g. if open descriptors on the related file or directory remain), then
  a final uninit when the descriptors finally go away.

* Enhanced the original CCMS code and the new ccms_inode to track three
  different cache coherency domains:  (1) A recursive topological domain
  which covers the inode and entire subtree.  (2) An attribute domain covering
  only the inode attributes, and (3) A data domain covering a data offset
  range or directory key range.

* Local cache states are implemented for the attribute and data range domains,
  the topological domain is not yet properly recursive.

* Remotely-granted cache states are not yet implemented.

11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Mon, 4 Jun 2012 03:34:35 +0000 (20:34 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agoigb: Unbreak compile on i386
Sepherosa Ziehau [Mon, 4 Jun 2012 01:26:27 +0000 (09:26 +0800)]
igb: Unbreak compile on i386

Reminded-by: swildner@
11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Sat, 2 Jun 2012 17:38:41 +0000 (10:38 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agoUnbreak kernel build. Also remove <sys/ccms.h> via 'make upgrade'.
Sascha Wildner [Sat, 2 Jun 2012 17:37:15 +0000 (19:37 +0200)]
Unbreak kernel build. Also remove <sys/ccms.h> via 'make upgrade'.

11 years agohammer2 - Move CCMS code from kernel to hammer2
Matthew Dillon [Sat, 2 Jun 2012 17:26:54 +0000 (10:26 -0700)]
hammer2 - Move CCMS code from kernel to hammer2

* Move the CCMS cache coherency module from the kernel to hammer2.  It will
  now be hammer2-specific.

11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Sat, 2 Jun 2012 17:22:04 +0000 (10:22 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agokernel - Add comment on spinlocks_wr
Matthew Dillon [Sat, 2 Jun 2012 17:21:03 +0000 (10:21 -0700)]
kernel - Add comment on spinlocks_wr

* Document a side effect related to spinlocks_wr in the LWKT scheduler.

11 years agokernel - Remove kernel-level ccms module (it will be moved into hammer2)
Matthew Dillon [Sat, 2 Jun 2012 17:15:51 +0000 (10:15 -0700)]
kernel - Remove kernel-level ccms module (it will be moved into hammer2)

* Remove the CCMS kernel layer.  The CCMS module is going to be moved
  directly into hammer2 in order to make hammer2 more portable.  For
  now that means moving the files into vfs/hammer2 in the hammer2 branch.

* CCMS is a logical cache coherency locking layer that has been in the
  DragonFly tree for a while but was not enabled by default.  Originally
  the plan was to not lock vnodes across operations but to instead acquire
  the appropriate CCMS lock(s), but rewiring all the filesystems proved to
  be too large a task.

* HAMMER2's cluster work is going to need this layer for real, but nothing
  else does.  What we will do instead (eventually) is add a mount flag to
  allow us to avoid locking vnodes across VNOPS calls which HAMMER2 will be
  able to specify.

11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Thu, 31 May 2012 17:26:35 +0000 (10:26 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agoigb: Optimize TX path
Sepherosa Ziehau [Sun, 27 May 2012 13:16:46 +0000 (21:16 +0800)]
igb: Optimize TX path

Reduce the number of status reports of TX ring: at most 16 reports every
TX descriptor count tranmission.  It is unnecessary to report status for
every TX descriptor.  This could greatly reduce bus traffic.

Use "Transmit Completions Head Write Back" as mentioned in the datasheet.
In this model, TX descriptors are no longer written by hardware thus cache
trashing is avoided.  This also greatly reduce the complexity of igb_txeof.

Implemention note of "Transmit Completions Head Write Back",
- HWBTHRESH is not used, since:
  o  82575 does not support it
  o  Number of status reports are already greatly reduced
- WB_on_EITR is not used, since:
  o  82575 does not support it
  o  It will cause unnecessary head write-back

Performance is almost same as previous code:
- 1.48Mpps for 18bytes UDP datagram
- Line rate for 1472bytes UDP datagram and TCP stream

11 years agotcp: Adjust tcpcb fields comment about NewReno fast recovery
Sepherosa Ziehau [Thu, 31 May 2012 09:32:08 +0000 (17:32 +0800)]
tcp: Adjust tcpcb fields comment about NewReno fast recovery

We have SACK based fast recovery; don't limits the fields to NewReno

11 years agokernel/drm: Remove bogus .PATHs.
Sascha Wildner [Thu, 31 May 2012 05:45:57 +0000 (07:45 +0200)]
kernel/drm: Remove bogus .PATHs.

11 years agodrm: Stow drivers for various chip families
François Tigeot [Tue, 29 May 2012 21:12:15 +0000 (23:12 +0200)]
drm: Stow drivers for various chip families

putting them into their own subdirectories in sys/dev/drm/

Inspired-by: David Shao's dflygsocdrm work
11 years agoFix for password truncation when using crypt(3) with DES
Aggelos Economopoulos [Wed, 30 May 2012 14:03:21 +0000 (16:03 +0200)]
Fix for password truncation when using crypt(3) with DES

Passwords containing a 0x80 byte (UTF-8 encoded ones, ASCII and
ISO-8859-* not affected) would get truncated as if a '\0' byte
had been encountered. This could result in some very weak passwords.

Reported-by: Rubin Xu, Joseph Bonneau, Donting Yu (CVE-2012-2143)
11 years agoicmp: Discard ICMP Source Quench per RFC6633
Sepherosa Ziehau [Wed, 30 May 2012 08:23:48 +0000 (16:23 +0800)]
icmp: Discard ICMP Source Quench per RFC6633

11 years agotcp: Only tcpopt.to_flags are needed in tcp_recv_dupack()
Sepherosa Ziehau [Wed, 30 May 2012 05:16:02 +0000 (13:16 +0800)]
tcp: Only tcpopt.to_flags are needed in tcp_recv_dupack()

While im here, change tcpopt.to_flags from u_long to u_int

11 years agotcp: Even for PAWS tolerance, no segments should follow segment with FIN
Sepherosa Ziehau [Wed, 30 May 2012 03:48:03 +0000 (11:48 +0800)]
tcp: Even for PAWS tolerance, no segments should follow segment with FIN

11 years agotcp: Don't let fast retransmit disrupt RTO rebasing
Sepherosa Ziehau [Tue, 29 May 2012 09:12:07 +0000 (17:12 +0800)]
tcp: Don't let fast retransmit disrupt RTO rebasing

While im here, add and adjust comment about spurious timeout retransmit
detection.

11 years agotcp/reass: Fix the cases that FIN got lost during reassemble
Sepherosa Ziehau [Wed, 30 May 2012 03:34:22 +0000 (11:34 +0800)]
tcp/reass: Fix the cases that FIN got lost during reassemble

While im here, set SACK report's right edge correctly if the current
segment could be merged with its succeeding segment.

11 years agotcp/sack: If other side reneged, discard the current SACK scoreboard
Sepherosa Ziehau [Wed, 30 May 2012 01:43:50 +0000 (09:43 +0800)]
tcp/sack: If other side reneged, discard the current SACK scoreboard

Other side reneging is detected using the first SACK record:
If its left edge is less than or equal to the cumulative ACK of the
incoming segment, other side probably reneged.

This fixes the later assertion that the first SACK record's left edge
must be above snd_una in tcp_sack_first_unsacked_len()

Add statistics about other side reneging

11 years agosocket: Fix wrongly numbered SIOCGIFDATA
Sepherosa Ziehau [Tue, 29 May 2012 08:09:47 +0000 (16:09 +0800)]
socket: Fix wrongly numbered SIOCGIFDATA

While im here, add comment about used number in 'i' group

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

11 years agodrm.4: A little clean up.
Sascha Wildner [Mon, 28 May 2012 11:33:17 +0000 (13:33 +0200)]
drm.4: A little clean up.

11 years agokernel: increase watchdog default period to 30s
François Tigeot [Sun, 27 May 2012 20:06:37 +0000 (22:06 +0200)]
kernel: increase watchdog default period to 30s

Reducing idle cpu time and power a bit

11 years agotcp/sack: Constify function arguments if possible
Sepherosa Ziehau [Mon, 28 May 2012 06:33:28 +0000 (14:33 +0800)]
tcp/sack: Constify function arguments if possible

11 years agoman/ktr: Adjust for the recent ether function cleanup
Sepherosa Ziehau [Mon, 28 May 2012 02:38:08 +0000 (10:38 +0800)]
man/ktr: Adjust for the recent ether function cleanup

Reminded-by: swildner@
11 years agotcp/sack: Only retransmit unSACKed data when fast retransmit
Sepherosa Ziehau [Mon, 28 May 2012 02:32:41 +0000 (10:32 +0800)]
tcp/sack: Only retransmit unSACKed data when fast retransmit

11 years agopktgen: Unbreak compile
Sepherosa Ziehau [Sun, 27 May 2012 11:32:00 +0000 (19:32 +0800)]
pktgen: Unbreak compile

11 years agokernel: in_cksum2.s is needed by inet6 code
François Tigeot [Sun, 27 May 2012 06:40:27 +0000 (08:40 +0200)]
kernel: in_cksum2.s is needed by inet6 code

11 years agoRemove a few more casts of NULL to some pointer type.
Sascha Wildner [Sat, 26 May 2012 23:00:15 +0000 (01:00 +0200)]
Remove a few more casts of NULL to some pointer type.

11 years agokernel: tcp_fasttimo() is dead
Francois Tigeot [Sat, 26 May 2012 14:07:50 +0000 (16:07 +0200)]
kernel: tcp_fasttimo() is dead

* It was actually killed in 1999

* Remove its last two remaining references

11 years agopci: Disable PCI express memory mapped access method by default
Sepherosa Ziehau [Sat, 26 May 2012 15:06:07 +0000 (23:06 +0800)]
pci: Disable PCI express memory mapped access method by default

It seems to hang some systems during boot.

Reported-by: y0netan1@
11 years agotools: Add netblast
Sepherosa Ziehau [Sat, 26 May 2012 15:05:01 +0000 (23:05 +0800)]
tools: Add netblast

Obtained-from: FreeBSD

11 years agoacpi: strupr() isn't used anywhere, so remove it.
Sascha Wildner [Sat, 26 May 2012 11:40:43 +0000 (13:40 +0200)]
acpi: strupr() isn't used anywhere, so remove it.