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

11 years agokernel - Adjust UFS and HAMMER to use uiomovebp()
Matthew Dillon [Fri, 17 Aug 2012 00:54:16 +0000 (17:54 -0700)]
kernel - Adjust UFS and HAMMER to use uiomovebp()

* Add uiomovebp(), a version of uiomove() which is aware of a locked bp
  representing the to or from buffer and can work-around issues related
  to VM faults causing recursions and deadlocks on the user buffer.

  uiomovebp() does not yet detect or handle deadlocks.  Implementing
  deadlock handling will require a certain degree of finess related to
  the vnode and bp locks and we don't want to have to do it unless we
  actually deadlock.  TODO.

* Adjust UFS, HAMMER, TMPFS, MSDOSFS, NFS, NTFS to use uiomovebp().

11 years agokernel - Change lockmgr LK_SHARED behavior to fix improper recursion return
Matthew Dillon [Fri, 17 Aug 2012 00:40:38 +0000 (17:40 -0700)]
kernel - Change lockmgr LK_SHARED behavior to fix improper recursion return

* When obtaining a LK_SHARED lock in a situation where you already own the
  lock LK_EXCLUSIVE, lockmgr would downgrade the lock to shared.

  This creates a very serious problem when large procedural recursions get
  a lock that is already being held exclusively but request a shared lock.
  When these recursions return the original top level will find its lock is
  no longer exclusive.

* This problem occured with vnode locks when a VOP_WRITE operation on a mmap'd
  space causes a VM fault which then turns around and issues a read().
  When the fault returns the vnode wound up locked shared instead of
  exclusive.

* Fix the problem by NOT downgrading an exclusive lock to shared when
  recursing on LK_SHARED.  Simply add another count to the exclusive
  lock.

11 years agokernel - Fix incorrect dirty/reprotect code in pageout
Matthew Dillon [Thu, 16 Aug 2012 18:42:25 +0000 (11:42 -0700)]
kernel - Fix incorrect dirty/reprotect code in pageout

* vm_object_page_collect_flush() was trying to re-protect VM pages that
  were still marked dirty after pageout I/O was initiated without owning
  the BUSY bit on the page.  This operation could race whatever I/O was
  going on and multiple issues.  Remove the re-protect.

  Just don't do it.  It's an unnecessary operation.  We still re-set
  PG_CLEANCHK on the page and that should be fine insofar as the pageout
  daemon goes.

* Note that the pageout_flush code protects the VM pages properly (to
  read-only) prior to initiating I/O .

* Should fix bug #2350

* Might be related to the wire-count bug considering that we were messing
  with the page's pmap without owning the BUSY bit.  Small chance.

11 years agokernel - Fix long-standing vm_map token panic
Matthew Dillon [Thu, 16 Aug 2012 17:46:33 +0000 (10:46 -0700)]
kernel - Fix long-standing vm_map token panic

* Bug turned out to be an error path in vm_map_find().

* This bug ate a lot of hours from several people, but Antonio was able
  to instrument the token path in a way that allowed us to narrow down
  and locate the problem.

Submitted-by: tuxillo, vsrinivas
Debugging-by: tuxillo
11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Thu, 16 Aug 2012 17:09:04 +0000 (10:09 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agokernel - Stop KTR logging during panic
Matthew Dillon [Thu, 16 Aug 2012 16:11:07 +0000 (09:11 -0700)]
kernel - Stop KTR logging during panic

* Stop all KTR logging when a panic occurs so the KTR buffer doesn't
  get wiped out by events during the panic & core dump.  This gives
  us a KTR buf snapshot as of the panic entry.

11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Thu, 16 Aug 2012 15:55:29 +0000 (08:55 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agokernel/linprocfs: Add a missing header for spin_{,un}lock().
Sascha Wildner [Thu, 16 Aug 2012 14:05:38 +0000 (16:05 +0200)]
kernel/linprocfs: Add a missing header for spin_{,un}lock().

11 years agokernel/linprocfs: Remove useless .PATH in the Makefile.
Sascha Wildner [Thu, 16 Aug 2012 14:04:10 +0000 (16:04 +0200)]
kernel/linprocfs: Remove useless .PATH in the Makefile.

11 years agotcp: Stringent TSO segment length assertion.
Sepherosa Ziehau [Thu, 16 Aug 2012 02:31:31 +0000 (10:31 +0800)]
tcp: Stringent TSO segment length assertion.

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

11 years agokernel - Fix numerous procfs/ptrace issues (3)
Matthew Dillon [Thu, 16 Aug 2012 01:17:43 +0000 (18:17 -0700)]
kernel - Fix numerous procfs/ptrace issues (3)

* Add a safety spin-lock around adjustments to p_stops so it hopefully
  interacts better with the event processing side of things.

11 years agokernel - Fix two UFS+softupdates bugs
Matthew Dillon [Thu, 16 Aug 2012 01:14:27 +0000 (18:14 -0700)]
kernel - Fix two UFS+softupdates bugs

* The softdep sema_*() functions (the ones in ffs_softdep.c, not the sysv
  functions) were not MPSAFE for the case where the passed interlock is
  NULL.  Use a spinlock for that case.

* getdirtybuf()'s semantics were broken and could return success even
  after having released &lk with the bp still unlocked.

  Fixing this should fix most of the reported softdep panics.

11 years agokernel - Fix exit races which can lead to a corrupt p_children list
Matthew Dillon [Thu, 16 Aug 2012 01:11:11 +0000 (18:11 -0700)]
kernel - Fix exit races which can lead to a corrupt p_children list

* There are a few races when getting multiple tokens where a threaded
  process is wait*()ing for exiting children from multiple threads
  at once.

  Fix the problem by serializing the operation on a per-child basis,
  and by using PHOLD/PRELE prior to acquiring the child's p_token.
  Then re-check the conditions before accepting the child.

* There is a small chance this will also reduce or fix VM on-exit races
  in i386, as this bug could result in an already-destroyed process
  being pulled off by the racing wait*().  Maybe 25% chance.

11 years agoKernel - Fix numerous procfs/ptrace issues (2)
Matthew Dillon [Thu, 16 Aug 2012 00:49:47 +0000 (17:49 -0700)]
Kernel - Fix numerous procfs/ptrace issues (2)

* The last fix wasn't quite right.  Fix it for real.

11 years agoKernel - Fix numerous procfs/ptrace issues
Matthew Dillon [Thu, 16 Aug 2012 00:18:31 +0000 (17:18 -0700)]
Kernel - Fix numerous procfs/ptrace issues

* Fix interactions during exec and exit.  This should fix truss
  (bug 2313).

* Reset p_* fields related to tracing on last procfs close for the
  process.

11 years agotuxload - Enhace tuxload a bit.
Antonio Huete Jimenez [Wed, 15 Aug 2012 19:00:01 +0000 (21:00 +0200)]
tuxload - Enhace tuxload a bit.

- Support several options (file size, number of files,
  multiple tests)
- It can run forever via option -c

11 years agohammer - Add tunable vfs.hammer.skip_redo
Antonio Huete Jimenez [Tue, 14 Aug 2012 19:55:36 +0000 (21:55 +0200)]
hammer - Add tunable vfs.hammer.skip_redo

This tunable can be used to change the behaviour of the redo
recovery in the case a HAMMER filesystem is not able to mount.

Following values are accepted:

0 - Run redo recovery normally and fail to mount if
    the operation fails (default).
1 - Run redo recovery, but don't fail to mount if the
    operation fails.
2 - Completely skip redo recovery (only for severe error
    conditions and/or debugging).

Pointed-out-by: dillon
11 years agoixgbe: Use callout_init_mp()
François Tigeot [Wed, 15 Aug 2012 07:44:20 +0000 (09:44 +0200)]
ixgbe: Use callout_init_mp()

* The timer callout function is mpsafe and callout_init() assumes it isn't

* Replace callout_init() by callout_init_mp() and avoid grabbing the mplock

11 years agoem: Add TSO support for certain PCIe chips
Sepherosa Ziehau [Wed, 15 Aug 2012 04:38:29 +0000 (12:38 +0800)]
em: Add TSO support for certain PCIe chips

11 years agoem: Utilize mbuf's header length to setup TX csum context
Sepherosa Ziehau [Wed, 15 Aug 2012 03:04:09 +0000 (11:04 +0800)]
em: Utilize mbuf's header length to setup TX csum context

11 years agoem: Change TXCSUM does not require reinitialize hardware
Sepherosa Ziehau [Wed, 15 Aug 2012 02:37:44 +0000 (10:37 +0800)]
em: Change TXCSUM does not require reinitialize hardware

11 years agoem: Pack boolean fields into flags
Sepherosa Ziehau [Wed, 15 Aug 2012 02:27:07 +0000 (10:27 +0800)]
em: Pack boolean fields into flags

11 years agoem: Increase RX/TX descriptor count to 512
Sepherosa Ziehau [Wed, 15 Aug 2012 02:01:21 +0000 (10:01 +0800)]
em: Increase RX/TX descriptor count to 512

11 years agobge: Allow max BDs based coalesce to be disabled
Sepherosa Ziehau [Tue, 14 Aug 2012 23:40:38 +0000 (07:40 +0800)]
bge: Allow max BDs based coalesce to be disabled

11 years agobge: Don't peek at the TX descriptor in txeof()
Sepherosa Ziehau [Tue, 14 Aug 2012 23:16:27 +0000 (07:16 +0800)]
bge: Don't peek at the TX descriptor in txeof()

11 years agoixgbe: Remove the multicast spinlock
François Tigeot [Tue, 14 Aug 2012 09:25:19 +0000 (11:25 +0200)]
ixgbe: Remove the multicast spinlock

Multicast read/write is serialized by netisr0, there is no need to
add another protection layer.

Advised-by: Sepherosa Ziehau
11 years agortld: Parse notes later (bug# 2376)
John Marino [Tue, 14 Aug 2012 14:38:31 +0000 (16:38 +0200)]
rtld: Parse notes later (bug# 2376)

Parse notes only after object structure has been allocated.

Taken-from: FreeBSD svn 239019
DragonFly-bug: <http://bugs.dragonflybsd.org/issue/2376>

11 years agobnx: Don't peek at the TX descriptor in txeof()
Sepherosa Ziehau [Tue, 14 Aug 2012 09:27:24 +0000 (17:27 +0800)]
bnx: Don't peek at the TX descriptor in txeof()

Which is completely unnecessary and pollute cache badly.

11 years agoemx: Pack boolean fields into flags
Sepherosa Ziehau [Tue, 14 Aug 2012 08:48:41 +0000 (16:48 +0800)]
emx: Pack boolean fields into flags

11 years agoigb: Remove no longer referenced code
Sepherosa Ziehau [Tue, 14 Aug 2012 08:21:49 +0000 (16:21 +0800)]
igb: Remove no longer referenced code

11 years agoigb: Remove unused code; adjust and add comment
Sepherosa Ziehau [Tue, 14 Aug 2012 08:17:24 +0000 (16:17 +0800)]
igb: Remove unused code; adjust and add comment

11 years agoigb: Remove unused field
Sepherosa Ziehau [Tue, 14 Aug 2012 08:10:26 +0000 (16:10 +0800)]
igb: Remove unused field

11 years agoixgbe: Remove a useless assertion
François Tigeot [Tue, 14 Aug 2012 05:49:31 +0000 (07:49 +0200)]
ixgbe: Remove a useless assertion

Found-by: Sascha Wildner
11 years agoinstaller: When setting the slice type for >2TB, ignore fdisk warnings.
Sascha Wildner [Mon, 13 Aug 2012 18:42:13 +0000 (20:42 +0200)]
installer: When setting the slice type for >2TB, ignore fdisk warnings.

With disks >2TB this step will lead to some whining from fdisk(8), but
since we'll boot anyway (with 34ea800d, we resort to the media size
when a maxed out slice size is detected), just ignore any issues which
fdisk(8) reports in this case.

After this commit, installing and booting from that installation on a
disk which is >2TB will work (tested with a 3TB ahci attached drive as
well as with a 4.5TB hptrr(4) RAID).

Dragonfly-bug: <https://bugs.dragonflybsd.org/issues/2264>
Reported-by: ftigeot
11 years agobce: Unbreak LINT building
Sepherosa Ziehau [Mon, 13 Aug 2012 01:20:52 +0000 (09:20 +0800)]
bce: Unbreak LINT building

Reminded-by: swildner@
11 years agoahci(4)/sili(4): Fix for drives >2TB.
Sascha Wildner [Mon, 13 Aug 2012 00:33:30 +0000 (02:33 +0200)]
ahci(4)/sili(4): Fix for drives >2TB.

CAM will issue the 16 byte version of the READ CAPACITY command when
maxsector is 0xffffffff:

----- scsi_da.c -----
if (maxsector == 0xffffffff) {
softc->state = DA_STATE_PROBE2;
kfree(rdcap, M_SCSIDA);
xpt_release_ccb(done_ccb);
xpt_schedule(periph, /*priority*/5);
return;
}
---------------------

However, we are subtracting 1 from it (presumably because it's a "last
sector on the device" value starting at 0) so in CAM, it ended up being
0xfffffffe, resulting in disks attached via ahci(4) and sili(4) to be
limited to 2TB.

To fix, set the local var to 0 in this case, so that after subtracting 1
from the value (cast to 32 bit) CAM gets 0xffffffff.

Fix-by: dillon
11 years agoixgbe: replace direct lockmgr calls by macros
François Tigeot [Sun, 12 Aug 2012 16:57:10 +0000 (18:57 +0200)]
ixgbe: replace direct lockmgr calls by macros

Only 3 lines didn't use the IXGBE_CORE_LOCK/UNLOCK() abstractions

11 years agobge: Add TSO support for BCM5755 family chips
Sepherosa Ziehau [Sun, 12 Aug 2012 10:44:28 +0000 (18:44 +0800)]
bge: Add TSO support for BCM5755 family chips

Obtained-from: FreeBSD

11 years agoixgbe(4): remove a lockinit() call
François Tigeot [Sun, 12 Aug 2012 11:00:20 +0000 (13:00 +0200)]
ixgbe(4): remove a lockinit() call

No need to initialize some lockmgr lock twice

11 years agohammer2 - Add peer_type field to LNK_CONN and LNK_SPAN
Matthew Dillon [Sun, 12 Aug 2012 02:32:03 +0000 (19:32 -0700)]
hammer2 - Add peer_type field to LNK_CONN and LNK_SPAN

* Adds a peer_type field allowing connections to identify what they are
  (i.e. a HAMMER2 mount, a CLUSTER controller, a BLOCK device controller).

  Rename the pfs_type field in the volume header, which never made much
  sense, to peer_type, which now does make sense though for the moment
  the only value it can have is HAMER2_PEER_HAMMER2.

* Filter HAMMER2_PEER_HAMMER2 peer types by pfs_clid to reduce unnecessary
  LNK_SPAN traffic being transmitted to a HAMMER2 mount (in the kernel).

* Minor cleanup.

11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Sun, 12 Aug 2012 02:31:00 +0000 (19:31 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agoboot - Fix boot probe ordering
Matthew Dillon [Sun, 12 Aug 2012 00:09:11 +0000 (17:09 -0700)]
boot - Fix boot probe ordering

* When boot loader support is compiled w/ UFS and HAMMER together, which
  is the default (note: HAMMER booting's never worked well)... the probe
  order was to check for the hammer volume header first and UFS second.

* Change the probe order to check for UFS first and HAMMER second.  The
  reason is that a 'newfs' (for UFS) doesn't wipe the hammer volume header
  because the ufs's newfs tries to 'skip' the partition reserved area of
  the disk.

  This is a huge throwback to the original BSD fdisk/disklabel which put
  the boot code INSIDE the 'a' partition.

* The DragonFly disklabel64 (which is now the default) does not have this
  problem so we could probably at some point adjust the UFS 'newfs' code to
  wipe the old 'reserve' area to really put a cap on the problem.

Reported-by: tuxillo
11 years agohammer2 - Implement automatic reconnect
Matthew Dillon [Sat, 11 Aug 2012 22:04:54 +0000 (15:04 -0700)]
hammer2 - Implement automatic reconnect

* Somehow the actual commit wound up in a merge
  e1648a68d2a340848f1c8ec7bd695c6285927392.

* When the hammer2 service daemon starts it now scans all hammer2 mount
  points and attempts to reconnect itself to each one.

  This allows the sysop to kill the hammer2 service daemon, which will
  remote the machine's mounts from the cluster, and then later restart
  it to add the machine's mounts back into the cluster.

* Fix a pthread detachment bug.  Some pthreads are not tracked and have
  to detach themselves to avoid a libpthread memory leak.

11 years agohammer2: More hammer2 msg cleanup, get reconnect ioctl working
Matthew Dillon [Sat, 11 Aug 2012 21:56:27 +0000 (14:56 -0700)]
hammer2: More hammer2 msg cleanup, get reconnect ioctl working

* Fix state machine sequencing issues when shutting down a connection.  We
  have to properly simulate DELETE messages for any open transactional
  states and give the function callbacks time to do there stuff.

* Properly respond to DELETE messages for LNK_CONN and LNK_SPAN transactions.

* Stabilize the RECLUSTER ioctl.

11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Sat, 11 Aug 2012 21:56:01 +0000 (14:56 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agohptrr.4: Remove unneeded .Pp
Sascha Wildner [Sat, 11 Aug 2012 20:15:12 +0000 (22:15 +0200)]
hptrr.4: Remove unneeded .Pp

11 years agopflogd(8): Raise WARNS to 5.
Sascha Wildner [Sat, 11 Aug 2012 10:25:10 +0000 (12:25 +0200)]
pflogd(8): Raise WARNS to 5.

11 years agolibm & rtld: Ansify some remaining functions.
Sascha Wildner [Sat, 11 Aug 2012 10:14:24 +0000 (12:14 +0200)]
libm & rtld: Ansify some remaining functions.

11 years agohammer2 - Config notifications, cleanup HAMMER2 VFS API
Matthew Dillon [Sat, 11 Aug 2012 03:46:51 +0000 (20:46 -0700)]
hammer2 - Config notifications, cleanup HAMMER2 VFS API

* A hammer2 volume has a PERSISTENT table of 256 entries in the media
  volume header for specifying how the cluster connects together.  Various
  hammer2 directives can list, add, or remove entries from this table.

  This table will be used for several different aspects of the filesystem
  and one of them is to tell the userland hammer2 service daemon what
  other machines to connect to.  That is, we want the cluster configuration
  to be persistently stored as part of a HAMMER2 filesystem.

* Add a notification message from the kernel to the daemon whenever this
  table id modified.  The kernel will also spam the contents of the table
  to the daemon when it first connects to the daemon.

  The service daemon tracks the table and will connect to (or disconnect
  from) the listed targets in real time.  In addition, the service daemon
  will retry a failed connection (or failed DNS lookup) forever as long
  as the entry is intact.  The idea being that a machine in the cluster
  will recover once transitory failures are resolved.

  This is a bit messy at the moment as two pthreads have to be created for
  each connection... one to handle connect, disconnect, and retry operations
  and the other to handle the actual message stream over the connection.

* Clean up the HAMMER2 VFS code's messaging APIs a bit, bringing them
  closer to the hammer2 userland APIs (though of course there will
  always be major differences).

* Adjust the hammer2 VFS to try to clean up open transactional states
  when a socket failure occurs before proceeding with a umount, so the
  related functional states can be triggered and cleaned up.

* Added an ioctl to reconnect a hammer2 mount to the userland hammer2
  service daemon (not yet used).  This will allow us to kill and restart
  the daemon and have it recover the communications pipes between itself
  and the HAMMER2 mounts in the kernel.

11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Fri, 10 Aug 2012 22:52:06 +0000 (15:52 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years ago/usr/src/Makefile: Remove duplicate target.
Sascha Wildner [Fri, 10 Aug 2012 21:22:03 +0000 (23:22 +0200)]
/usr/src/Makefile: Remove duplicate target.

11 years agohammer2 - Message span tree work
Matthew Dillon [Fri, 10 Aug 2012 18:20:24 +0000 (11:20 -0700)]
hammer2 - Message span tree work

* Trivially optimize out the sending of a SPAN back across the same
  connection it was received from.

11 years agohammer2 - Message routing work
Matthew Dillon [Fri, 10 Aug 2012 17:42:08 +0000 (10:42 -0700)]
hammer2 - Message routing work

* Further API simplification

* Start adding router infrastructure to the kernel VFS

* Looks like we will need a 'source' and 'target' field in
  the message header after all (replaces the single 'spanid' field),
  in order to track the reply VC as a message is relayed.

11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Fri, 10 Aug 2012 17:39:59 +0000 (10:39 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agobce: Add TSO support
Sepherosa Ziehau [Fri, 10 Aug 2012 08:22:44 +0000 (16:22 +0800)]
bce: Add TSO support

Obatined-from: FreeBSD

With following modification:
These chips can handle ip.ip_len and tcphdr.th_sum, if they are setup
according to Microsoft LSO specification, so ip.ip_len should not be
cleared and tcphdr.th_sum should be left as it is.

According-to: bnx2

11 years agobce: Remove debug stuffs from polling code
Sepherosa Ziehau [Fri, 10 Aug 2012 06:20:49 +0000 (14:20 +0800)]
bce: Remove debug stuffs from polling code

11 years agobce: Remove debug stuffs from output path
Sepherosa Ziehau [Fri, 10 Aug 2012 06:19:15 +0000 (14:19 +0800)]
bce: Remove debug stuffs from output path

11 years agotuxload - Minor modifications.
Antonio Huete Jimenez [Fri, 10 Aug 2012 08:42:07 +0000 (10:42 +0200)]
tuxload - Minor modifications.

- Add some output.
- First create the files, then mmap() them

11 years agohammer2 - further crypto cleanup
Alex Hornung [Fri, 10 Aug 2012 07:37:22 +0000 (08:37 +0100)]
hammer2 - further crypto cleanup

 * put the symmetric crypto algorithms (so far only GCM) into a table.
   The algorithm is currently chosen via a define (HAMMER2_CRYPTO_ALGO),
   but in the future it would be trivial to make it a runtime setting.

 * Link the crypto chunk size to HAMMER2_MSG_ALIGN, since we want the
   chunks as big as possible, but not so big that a message gets stuck.

11 years agobce: Set RX interrupt rate ~6000Hz
Sepherosa Ziehau [Fri, 10 Aug 2012 04:51:59 +0000 (12:51 +0800)]
bce: Set RX interrupt rate ~6000Hz

11 years agobce: Don't loop in the interrupt handler to drain TX/RX
Sepherosa Ziehau [Fri, 10 Aug 2012 04:36:17 +0000 (12:36 +0800)]
bce: Don't loop in the interrupt handler to drain TX/RX

11 years agobce: Remove debug stuffs on RX/TX interrupt path
Sepherosa Ziehau [Fri, 10 Aug 2012 02:27:13 +0000 (10:27 +0800)]
bce: Remove debug stuffs on RX/TX interrupt path

11 years agobce: Remove debugging stuffs in interrupt handler
Sepherosa Ziehau [Fri, 10 Aug 2012 02:19:01 +0000 (10:19 +0800)]
bce: Remove debugging stuffs in interrupt handler

11 years agohammer2 - Message routing work
Matthew Dillon [Fri, 10 Aug 2012 01:11:32 +0000 (18:11 -0700)]
hammer2 - Message routing work

* Make hammer2_router a separately allocated structure so we can use
  it as a persistent entity when its related hammer2_iocom, h2span_link,
  or h2span_relay structure gets ripped out.

11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Fri, 10 Aug 2012 01:05:44 +0000 (18:05 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agohammer2 - make gcm IV counter endian-agnostic
Alex Hornung [Thu, 9 Aug 2012 19:55:55 +0000 (20:55 +0100)]
hammer2 - make gcm IV counter endian-agnostic

11 years agohammer2 - error out on enc/dec errors
Alex Hornung [Thu, 9 Aug 2012 19:31:53 +0000 (20:31 +0100)]
hammer2 - error out on enc/dec errors

11 years agohammer2 - Fix nact assertion
Matthew Dillon [Thu, 9 Aug 2012 20:05:58 +0000 (13:05 -0700)]
hammer2 - Fix nact assertion

* An nact assertion was getting hit because of an assumption that
  the assertion caused not to be correct.  Fix the assumption.

11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Thu, 9 Aug 2012 19:51:25 +0000 (12:51 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agoposix_memalign.3: Document aligned_alloc().
Sascha Wildner [Thu, 9 Aug 2012 19:15:53 +0000 (21:15 +0200)]
posix_memalign.3: Document aligned_alloc().

11 years agohammer2 - AES GCM support
Alex Hornung [Thu, 9 Aug 2012 18:35:31 +0000 (19:35 +0100)]
hammer2 - AES GCM support

11 years agohammer2 - Major crypto API cleanup
Matthew Dillon [Thu, 9 Aug 2012 18:02:05 +0000 (11:02 -0700)]
hammer2 - Major crypto API cleanup

* For now always read aux_data in via the FIFO, remove the
  direct-to-message read().

* Cleanup the crypto API

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

11 years agolibc: Add a copyright to aligned_alloc.c
Sascha Wildner [Thu, 9 Aug 2012 17:42:46 +0000 (19:42 +0200)]
libc: Add a copyright to aligned_alloc.c

11 years agomalloc.3: Remove a ,
Sascha Wildner [Thu, 9 Aug 2012 17:39:11 +0000 (19:39 +0200)]
malloc.3: Remove a ,

11 years agoixgbe(4): Sync with FreeBSD
François Tigeot [Thu, 9 Aug 2012 10:52:34 +0000 (12:52 +0200)]
ixgbe(4): Sync with FreeBSD

Update to the ixgbe driver:
  - Add a couple of new devices
  - Flow control changes in shared and core code
  - Bug fix to Flow Director for 82598
  - Shared code sync to internal with required core change

11 years agoixgbe: compilation fix for debug routines
François Tigeot [Thu, 9 Aug 2012 08:47:55 +0000 (10:47 +0200)]
ixgbe: compilation fix for debug routines

The driver didn't build when DBG was set to 1.

11 years agoat_quick_exit.3: Add an ERRORS section.
Sascha Wildner [Thu, 9 Aug 2012 07:58:46 +0000 (09:58 +0200)]
at_quick_exit.3: Add an ERRORS section.

Submitted-by: vsrinivas
11 years agolibc: Add a copyright to quick_exit.c
Sascha Wildner [Thu, 9 Aug 2012 07:58:31 +0000 (09:58 +0200)]
libc: Add a copyright to quick_exit.c

Reported-by: vsrinivas
11 years ago<stdlib.h>: Adjust the visibility of our C11 functions.
Sascha Wildner [Thu, 9 Aug 2012 07:53:03 +0000 (09:53 +0200)]
<stdlib.h>: Adjust the visibility of our C11 functions.

11 years agoAdd at_quick_exit(3) and quick_exit(3) manual pages.
Sascha Wildner [Thu, 9 Aug 2012 07:50:14 +0000 (09:50 +0200)]
Add at_quick_exit(3) and quick_exit(3) manual pages.

Taken-from: FreeBSD

11 years agomdoc: Let us refer to C11 in manual pages with ".St -isoC-2011".
Sascha Wildner [Thu, 9 Aug 2012 07:40:10 +0000 (09:40 +0200)]
mdoc: Let us refer to C11 in manual pages with ".St -isoC-2011".

11 years agoxterm: Remove ability to restore console after man, less, etc.
John Marino [Wed, 8 Aug 2012 23:00:33 +0000 (01:00 +0200)]
xterm: Remove ability to restore console after man, less, etc.

Having a man page disappear before the read the end (if it indeed appears
at all) is pretty annoying.  Equally annoying is using the "more" command
on a file with few lines only to see nothing.  The default behavior of
xterm console had few fans.

This removes the smcup and rmcup codes from xterm-basic, the basis for
the xterm console definitions.  Now man pages are left on the screen
after viewing, and the pagers work as expected.

11 years agoemx: Status change is protected by main serializer
Sepherosa Ziehau [Thu, 9 Aug 2012 06:56:45 +0000 (14:56 +0800)]
emx: Status change is protected by main serializer

No need to hold all of the serializers during a status poll

11 years agohammer2 - SPAN protocol work, router work
Matthew Dillon [Thu, 9 Aug 2012 06:25:23 +0000 (23:25 -0700)]
hammer2 - SPAN protocol work, router work

* Fix SPAN relay sort and sequencing bugs.

* Start reworking the APIs to accomodate routed messages.  Start by
  creating a hammer2_router structure and adjusting most of the msg
  functions to pass it instead of the iocom.

* Fix hammer2_state races by moving the state allocation to
  hammer2_msg_alloc() instead of hammer2_msg_write(). This gives
  code a chance to assign the state->any.* field without having to
  worry about the state getting ripped out from under us.

11 years agohammer2 - SPAN protocol work
Matthew Dillon [Thu, 9 Aug 2012 01:32:16 +0000 (18:32 -0700)]
hammer2 - SPAN protocol work

* Because we allow loops in the graph the loss of a feeder node can
  result in a tail-chasing loop of SPAN updates with an ever-growing
  distance parameter.

  To deal with this a spanning tree distance limit is required, beyond
  which no propagation occurs which terminates the chase.  The tail
  then catches up to the head and the node is finally removed from
  the spanning tree entirely.

  This fixes the propagation of spanning tree deletions e.g. when we
  umount a HAMMER2 PFS.

* Fix a state insertion bug.  A structure was being inserted into the
  red-black tree before the required fields were being initialized.
  Corrects a SPAN propagation fault.

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

11 years agocut(1): Add back -w (split on whitespace functionality).
Sascha Wildner [Thu, 9 Aug 2012 00:56:25 +0000 (02:56 +0200)]
cut(1): Add back -w (split on whitespace functionality).

Reported-by: Tim Darby <t+dfbsd@timdarby.net>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2385>

11 years agohammer2 - userland API / span work
Matthew Dillon [Wed, 8 Aug 2012 22:04:50 +0000 (15:04 -0700)]
hammer2 - userland API / span work

* Fix a stall bug in the streaming write code

* Add some pretty-printing support for debug output.  Also remove
  a ton of debug messages.

* Add a remote shell 'tree' command to dump the spanning tree.

* Cleanup some of the state handling and error codes.

11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Wed, 8 Aug 2012 22:04:02 +0000 (15:04 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agocut: Sync with FreeBSD
John Marino [Wed, 8 Aug 2012 21:22:08 +0000 (23:22 +0200)]
cut: Sync with FreeBSD

Addresses:
http://bugs.dragonflybsd.org/issues/2385
reported-by: Tim Darby

11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Wed, 8 Aug 2012 16:29:57 +0000 (09:29 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agohpt27xx(4): Use NULL for pointers.
Sascha Wildner [Wed, 8 Aug 2012 13:42:58 +0000 (15:42 +0200)]
hpt27xx(4): Use NULL for pointers.

11 years agoAdd the hpt27xx(4) driver for HighPoint RocketRAID 27xx SAS controllers.
Sascha Wildner [Wed, 8 Aug 2012 12:18:22 +0000 (14:18 +0200)]
Add the hpt27xx(4) driver for HighPoint RocketRAID 27xx SAS controllers.

The manual page mentions the following adapters to be supported:

* RocketRAID 271x
* RocketRAID 272x
* RocketRAID 274x
* RocketRAID 276x
* RocketRAID 278x

I have tested it with a RocketRAID 2720.

Taken-from: FreeBSD

11 years agobnx: Disable RX max BDs based interrupt moderation
Sepherosa Ziehau [Wed, 8 Aug 2012 13:11:11 +0000 (21:11 +0800)]
bnx: Disable RX max BDs based interrupt moderation

The RX max coalesce BDs is limited to 255, which means that the chip will
generate ~5800 interrupts/s when it sinks 1.48Mpps tiny packets.  However,
interrupt rate at 4000Hz is already enough for the chip to sink 1.48Mpps
tiny packets, so ticks based RX interrupt moderation should be prefered.

11 years agobnx: Allow TX/RX max coalesce BDs to be 0; mainly for debugging
Sepherosa Ziehau [Wed, 8 Aug 2012 11:11:03 +0000 (19:11 +0800)]
bnx: Allow TX/RX max coalesce BDs to be 0; mainly for debugging

11 years agobnx: Correct debug messages
Sepherosa Ziehau [Wed, 8 Aug 2012 08:35:53 +0000 (16:35 +0800)]
bnx: Correct debug messages

11 years agobnx: Rearrange the code to check the spare TX descripors first
Sepherosa Ziehau [Wed, 8 Aug 2012 08:11:11 +0000 (16:11 +0800)]
bnx: Rearrange the code to check the spare TX descripors first

While im here, remove the useless fragmentation checksum code, which
is never supported by this driver