5 years agojme(4): Using code logic to create redirect table.
Sepherosa Ziehau [Wed, 18 Mar 2009 13:11:19 +0000 (21:11 +0800)]
jme(4): Using code logic to create redirect table.

- Avoid using magic number when creating redirect table, apply
  code logic instead.
- Add comment about how the redirect table is filled.

5 years agojme(4): Get key from Toeplitz code
Sepherosa Ziehau [Wed, 18 Mar 2009 12:20:27 +0000 (20:20 +0800)]
jme(4): Get key from Toeplitz code

5 years agotoeplitz: Add toeplitz_get_key() and nuke toeplitz_get_keyseed()
Sepherosa Ziehau [Wed, 18 Mar 2009 12:17:42 +0000 (20:17 +0800)]
toeplitz: Add toeplitz_get_key() and nuke toeplitz_get_keyseed()

toeplitz_get_key() hides more implementation details (i.e. key
seed replication) from callers than toeplitz_get_keyseed().

5 years agopax(1): Remove argument names from prototypes.
Sascha Wildner [Wed, 18 Mar 2009 10:39:52 +0000 (11:39 +0100)]
pax(1): Remove argument names from prototypes.

5 years agopax(1): Fix WARNS regression
Sascha Wildner [Wed, 18 Mar 2009 10:30:53 +0000 (11:30 +0100)]
pax(1): Fix WARNS regression

5 years agomotd(5) manual page: "Update" the example for DragonFly.
Sascha Wildner [Tue, 17 Mar 2009 21:43:45 +0000 (22:43 +0100)]
motd(5) manual page: "Update" the example for DragonFly.

Reported-by: free-coder
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1316>

5 years agoshlock(1) manual page: Fix typo
Sascha Wildner [Tue, 17 Mar 2009 21:40:33 +0000 (22:40 +0100)]
shlock(1) manual page: Fix typo

Reported-by: free-coder
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1316>

5 years agoCreate destination on copy if it doesn't exists.
Hasso Tepper [Tue, 17 Mar 2009 14:41:03 +0000 (16:41 +0200)]
Create destination on copy if it doesn't exists.

Should conform to SUSv3 and fixes a lot of building failures in pkgsrc.

Digged-out-by: Alex Hornung
5 years agoatphy: Reset PHY after extracting MII capabilities, since reset will
Sepherosa Ziehau [Tue, 17 Mar 2009 12:58:18 +0000 (20:58 +0800)]
atphy: Reset PHY after extracting MII capabilities, since reset will
trigger auto negotiation, which depends on MII capabilities.

5 years agoale(4): Don't read/write 1000baseT specific MII registers on 10/100M only device
Sepherosa Ziehau [Tue, 17 Mar 2009 12:53:37 +0000 (20:53 +0800)]
ale(4): Don't read/write 1000baseT specific MII registers on 10/100M only device

It looks like on 10/100M only device they do contain "valid" 1000baseT values.

5 years agobce/bge(4): Allow txcsum/rxcsum to be set individually
Sepherosa Ziehau [Tue, 17 Mar 2009 12:41:48 +0000 (20:41 +0800)]
bce/bge(4): Allow txcsum/rxcsum to be set individually

5 years agotcp_wrapper: Make sure that the buf has more than 1byte, before calling fgets()
Sepherosa Ziehau [Tue, 17 Mar 2009 11:46:52 +0000 (19:46 +0800)]
tcp_wrapper: Make sure that the buf has more than 1byte, before calling fgets()

FreeBSD-PR: kern/132705
Obtained-from: OpenBSD

5 years agoether_demux: Add comment
Sepherosa Ziehau [Tue, 17 Mar 2009 11:09:27 +0000 (19:09 +0800)]
ether_demux: Add comment

5 years agobridge: If we could enter bridge_input, then M_ETHER_BRIDGED will not be set.
Sepherosa Ziehau [Tue, 17 Mar 2009 11:04:32 +0000 (19:04 +0800)]
bridge: If we could enter bridge_input, then M_ETHER_BRIDGED will not be set.

5 years agoether_input: Add M_ETHER_VLANCHECKED
Sepherosa Ziehau [Tue, 17 Mar 2009 11:00:37 +0000 (19:00 +0800)]
ether_input: Add M_ETHER_VLANCHECKED

- In ether_input_handler(), if ether_vlancheck() has not been called
  (M_ETHER_VLANCHECKED) call it there; this could happen with upcoming
  RSS changes.
- Clear ethernet protocol mbuf flags before entering upper layer.

5 years agoether_input: Factor out ether_vlancheck()
Sepherosa Ziehau [Mon, 16 Mar 2009 12:39:53 +0000 (20:39 +0800)]
ether_input: Factor out ether_vlancheck()

5 years agoAdd M_LENCHECKED mbuf flag.
Sepherosa Ziehau [Sun, 15 Mar 2009 09:40:24 +0000 (17:40 +0800)]
Add M_LENCHECKED mbuf flag.

This flag indicates that various protocol length fields of the packet
are checked.  It is only used by IPv4 currently (ip_lengthcheck()).

5 years agoDefine M_ETHER_BRIDGED to M_PROTO1
Sepherosa Ziehau [Sun, 15 Mar 2009 08:42:07 +0000 (16:42 +0800)]

5 years agoDuplicated M_PROTO1 in M_COPYFLAGS
Sepherosa Ziehau [Sun, 15 Mar 2009 08:31:44 +0000 (16:31 +0800)]
Duplicated M_PROTO1 in M_COPYFLAGS

5 years ago802.11: Clear M_PROTO? flags before calling ifnet.if_input
Sepherosa Ziehau [Sun, 15 Mar 2009 08:19:00 +0000 (16:19 +0800)]
802.11: Clear M_PROTO? flags before calling ifnet.if_input

5 years agoDefer ethernet mcast/bcast address detection to ether_input_handler()
Sepherosa Ziehau [Sun, 15 Mar 2009 03:20:40 +0000 (11:20 +0800)]
Defer ethernet mcast/bcast address detection to ether_input_handler()

5 years agoip_demux: If RSS kernel option is set, use Toeplitz hash function
Sepherosa Ziehau [Sat, 14 Mar 2009 12:59:11 +0000 (20:59 +0800)]
ip_demux: If RSS kernel option is set, use Toeplitz hash function

5 years agoSync zoneinfo database with tzdata2009c from elsie.
Sascha Wildner [Mon, 16 Mar 2009 21:52:42 +0000 (22:52 +0100)]
Sync zoneinfo database with tzdata2009c from elsie.

northamerica:   8.26 -> 8.27

Cuba started DST one week earlier than previously thought.

5 years agoRemove CVS Id from DragonFly fortune file
Matthias Schmidt [Mon, 16 Mar 2009 14:26:06 +0000 (15:26 +0100)]
Remove CVS Id from DragonFly fortune file

Remove the ID as the information is now misleading.  The content is
newer as the ID suggests.

Spotted-by: hasso@
5 years agoHAMMER VFS - rebalancing, zero unused fields in boundary element
Matthew Dillon [Mon, 16 Mar 2009 04:45:57 +0000 (21:45 -0700)]
HAMMER VFS - rebalancing, zero unused fields in boundary element

The rebalancer was not zeroing certain unused fields in a newly created
boundary element when truncating an existing internal B-Tree node.

While these fields are not used by the filesystem for boundary elements,
they are still expected to be zero'd out.

5 years agoHAMMER VFS - Add a B-Tree rebalancing feature.
Matthew Dillon [Sun, 15 Mar 2009 22:28:38 +0000 (15:28 -0700)]
HAMMER VFS - Add a B-Tree rebalancing feature.

This is the initial commit of B-Tree rebalancing support for HAMMER.
The rebalancer may be run using the 'hammer rebalance' utility directive.

The leafs in a HAMMER B-Tree all reside at the same depth.  Insertions and
deletions only collapse the B-Tree when a leaf node becomes empty and then
only if any necessary recursion (possibly reaching the root node) succeeds.
No balancing occurs during normal operation and B-Tree nodes can wind up
with wildly different element counts which bloats the tree and makes
searches less efficient.

The rebalancer effectively does a depth-first traversal of the B-Tree,
visiting leaf nodes first and parent nodes as a trailing function on the
way back up the tree.  For any given internal node the sum total of
elements contained in its children is divided by the number of children.
The effective number of children is reduced as is practical to obtain a 75%
fill level.  The elements are then packed into the children and any
wholely empty children left over are deleted.  The rebalancer does not
create new B-Tree nodes.

Element packing is fairly complex, requiring tracked cursors, on-media
parent pointers, mirror TIDs, and boundary elements to be updated.  The
rebalancer must hold a large number of B-Tree nodes exclusively locked
while running.

5 years agoRemove conditionals based on #if defined(i386) which wrapped code which was
Matthew Dillon [Sun, 15 Mar 2009 19:26:06 +0000 (12:26 -0700)]
Remove conditionals based on #if defined(i386) which wrapped code which was
unused.  Gcc does not define 'i386' anyway, it uses __i386__.

This also fixes some clang issues.

Requested-by: Alex Hornung
5 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sun, 15 Mar 2009 00:35:39 +0000 (17:35 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

5 years agoHAMMER Utility: Change B-Tree, inodes, and dir reblocking params, add rebalance
Matthew Dillon [Sun, 15 Mar 2009 00:22:40 +0000 (17:22 -0700)]
HAMMER Utility: Change B-Tree, inodes, and dir reblocking params, add rebalance

* The normal cleanup operations now reblock all B-Tree, inode, and directory
  elements in the normal daily reblock mode instead of only the ones in
  fragmented big-blocks.  Bulk data is handled by the 30-day recopy mode.

* Add a new directive 'rebalance' (a future VFS ioctl).  This directive will
  tell the HAMMER VFS to rebalance the B-Tree.  HAMMER B-Trees are always
  balanced by depth but degenerate cases with minimal elements in a node
  can easily build up.  The new directive will rebalance the elements in
  each B-Tree node.

* The hammer cleanup directive was not reblocking directories.  Now it does.

It usually does not take very long to reblock the B-Tree nodes, inodes, or
directory elements.  Reblocking these unconditionally, instead of just
reblocking fragmented allocation areas, keeps the B-Tree in a more optimal
layout, though there is still a lack of correlation between inode numbers
and directory scan order.

5 years agorss: Add RSS_DEBUG kernel option
Sepherosa Ziehau [Sat, 14 Mar 2009 09:02:12 +0000 (17:02 +0800)]
rss: Add RSS_DEBUG kernel option

5 years agorss: Add Toeplitz hash function
Sepherosa Ziehau [Sat, 14 Mar 2009 08:14:45 +0000 (16:14 +0800)]
rss: Add Toeplitz hash function

5 years agoip_demux: Wrap INP_MPORT_HASH_{TCP,UDP}() around INP_MPORT_HASH()
Sepherosa Ziehau [Sat, 14 Mar 2009 06:11:16 +0000 (14:11 +0800)]
ip_demux: Wrap INP_MPORT_HASH_{TCP,UDP}() around INP_MPORT_HASH()

5 years agoip_demux: Test IN_MULTICAST() if RSS kernel option is not enabled.
Sepherosa Ziehau [Sat, 14 Mar 2009 06:01:29 +0000 (14:01 +0800)]
ip_demux: Test IN_MULTICAST() if RSS kernel option is not enabled.

5 years agoAdd static ARP support.
Sepherosa Ziehau [Sat, 14 Mar 2009 03:41:35 +0000 (11:41 +0800)]
Add static ARP support.

Obtained-from: FreeBSD

5 years agoemx(4): Fix comment
Sepherosa Ziehau [Sat, 14 Mar 2009 02:56:25 +0000 (10:56 +0800)]
emx(4): Fix comment

5 years agoifconfig(8): Remove string of if_flags, which will never be adopted.
Sepherosa Ziehau [Sat, 14 Mar 2009 02:54:42 +0000 (10:54 +0800)]
ifconfig(8): Remove string of if_flags, which will never be adopted.

5 years agojme(4): Correct SIOCSIFCAP ioctl handling
Sepherosa Ziehau [Sat, 14 Mar 2009 02:22:25 +0000 (10:22 +0800)]
jme(4): Correct SIOCSIFCAP ioctl handling

- Upper layer will always check if_capabilities against ifreq,
  so we don't need to check if_capabilities again.
- When IFCAP_RSS changes, the jme_init() should be called only if
  the interface is running.
- Don't use compile time condition for the code handling IFCAP_RSS.

5 years agoemx(4): Support IFCAP_RSS
Sepherosa Ziehau [Sat, 14 Mar 2009 02:20:53 +0000 (10:20 +0800)]
emx(4): Support IFCAP_RSS

5 years agorss: Add RSS kernel option; Add IFCAP_RSS iface capability
Sepherosa Ziehau [Fri, 13 Mar 2009 12:46:37 +0000 (20:46 +0800)]
rss: Add RSS kernel option; Add IFCAP_RSS iface capability

Convert jme(4) to use the new IFCAP_RSS.

5 years agoUpdate cpdup rev to 1.12.
Matthew Dillon [Fri, 13 Mar 2009 04:15:46 +0000 (21:15 -0700)]
Update cpdup rev to 1.12.

5 years agoFix kernel panic on NULL pointer deref w/ certain ktrace commands, allow -c -f.
Matthew Dillon [Thu, 12 Mar 2009 16:15:10 +0000 (09:15 -0700)]
Fix kernel panic on NULL pointer deref w/ certain ktrace commands, allow -c -f.

Fix a kernel panic on a NULL pointer dereference with certain ktrace -c

Allow the -c -f <file> combination (taken from FreeBSD).

Submitted-by: Stathis Kamperis <beket>
5 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Thu, 12 Mar 2009 16:08:55 +0000 (09:08 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

5 years agoHAMMER VFS - return shorter-form softlinks "@@-1:%05d" when appropriate.
Matthew Dillon [Thu, 12 Mar 2009 16:03:08 +0000 (09:03 -0700)]
HAMMER VFS - return shorter-form softlinks "@@-1:%05d" when appropriate.

The HAMMER VFS supports a short "@@-1:%05d" for master PFSs.  Adjust the
HAMMER VFS to return softlinks in that form and adjust the hammer cleanup
code to recognize softlinks in that form.

Note that PFS softlinks are created as "@@PFS%05d", but the HAMMER VFS
presents them in an expanded form which allows the HAMMER VFS to reflect
the latest synchronized transaction id on slave PFSs.  This also prevents
slave PFSs from confusing DragonFly's namecache as each snapshot will appear
to be an entirely different path.

Unfortunately this does mean that cpdup/cp/tar will pickup a translated
softlink and not the actual one.  It's just something else to remember
about these 'weird' PFS mount points.

Suggested-by: YONETANI Tomokazu <qhwt+dfly@les.ath.cx>
5 years agoemx(4): Move EMX_RSS_DEBUG into opt_emx.h
Sepherosa Ziehau [Thu, 12 Mar 2009 12:00:55 +0000 (20:00 +0800)]
emx(4): Move EMX_RSS_DEBUG into opt_emx.h

5 years agojme(4): Move JME_RSS_DEBUG into opt_jme.h
Sepherosa Ziehau [Thu, 12 Mar 2009 11:24:52 +0000 (19:24 +0800)]
jme(4): Move JME_RSS_DEBUG into opt_jme.h

5 years agoidentcpu.c: Add MOVBE feature string.
Sascha Wildner [Wed, 11 Mar 2009 19:02:10 +0000 (20:02 +0100)]
identcpu.c: Add MOVBE feature string.

5 years agoExtract PFS null mounts from anywhere in the filesystem, instead of just
Matthew Dillon [Wed, 11 Mar 2009 17:45:38 +0000 (10:45 -0700)]
Extract PFS null mounts from anywhere in the filesystem, instead of just
from the /pfs subdirectory.

Submitted-by: pgeorgi (via bugs)
5 years agoem(4): Enable RX after RDH is configured (backport from emx(4)).
Sepherosa Ziehau [Tue, 10 Mar 2009 13:14:22 +0000 (21:14 +0800)]
em(4): Enable RX after RDH is configured (backport from emx(4)).

According to Intel OpenSDM's RDH description:
"... If software were to write to this register while the receive
 function was enabled, the on-chip descriptor buffers can be
 invalidated and other indeterminate operations might result ..."

Maybe we were just that lucky, the driver actually worked ...

5 years agoem(4): Backport part of 62e0614e4c59f94c83cdf24ebf5995add53f03bf
Sepherosa Ziehau [Tue, 10 Mar 2009 13:10:23 +0000 (21:10 +0800)]
em(4): Backport part of 62e0614e4c59f94c83cdf24ebf5995add53f03bf

Used transmit descriptors do not need to be cleared in txeof and

5 years agoem(4): Backport cc8fffade4528dd788a4789998ed3d1e85f9644a
Sepherosa Ziehau [Tue, 10 Mar 2009 12:00:40 +0000 (20:00 +0800)]
em(4): Backport cc8fffade4528dd788a4789998ed3d1e85f9644a

Use E1000_ICR_ macros when check against value read from ICR

5 years agoem(4): Backport part of 62e0614e4c59f94c83cdf24ebf5995add53f03bf
Sepherosa Ziehau [Tue, 10 Mar 2009 11:58:10 +0000 (19:58 +0800)]
em(4): Backport part of 62e0614e4c59f94c83cdf24ebf5995add53f03bf

em_buffer.m_head is only set/cleared in the last em_buffer associated
with the packet, so we don't need to keep clearing it in transmit
descriptor setup loop.

5 years agonetwork: Turn on adaptive MPSAFE for network threads, and MPSAFE for IP and ARP
Sepherosa Ziehau [Tue, 10 Mar 2009 10:56:40 +0000 (18:56 +0800)]
network: Turn on adaptive MPSAFE for network threads, and MPSAFE for IP and ARP

Approved-by dillon@

5 years agoInstall ncurses_dll.h to unbreak devel/ncursesw from pkgsrc.
Hasso Tepper [Mon, 9 Mar 2009 13:52:11 +0000 (15:52 +0200)]
Install ncurses_dll.h to unbreak devel/ncursesw from pkgsrc.

Pkgsrc assumes that our ncurses is good enough to use, but installs
ncursesw/ncurses.h header which includes ncurses_dll.h. So, compiling
every piece of software using ncursesw/ncurses.h just failed.

5 years agosignals: rename CURSIGNB to CURSIG_NOBLOCK and unify implementation
Simon Schubert [Sat, 7 Mar 2009 18:35:10 +0000 (19:35 +0100)]
signals: rename CURSIGNB to CURSIG_NOBLOCK and unify implementation

CURSIG() is defined as __cursig() and CURSIGNB() as __cursignb().
However both __cursig() and __cursignb() do almost the same thing, so
consolidate the code into one function.

5 years agosignals: rework when CURSIG/issignal can stop a thread for tracing
Simon Schubert [Sat, 7 Mar 2009 17:09:13 +0000 (18:09 +0100)]
signals: rework when CURSIG/issignal can stop a thread for tracing

When tracing a process, it can happen that the thread would get stopped
due to the signal and its tracing.  In this case the tracing parent
would get notified and it might choose to let the process to serve the

However if this stop+trace is happening somewhere deep in the kernel due
to a call to CURSIG(), it might happen that the same signal again is the
cause for a stop+trace cycle because of another call to CURSIG() while
the call stack is unwinding.

Introduce CURSIG_TRACE(), which explicitly allows stopping for tracing
signal delivery.  This is only called from userret().
All other instances of CURSIG() may still block/sleep because of SA_STOP
signals, but these invocations may not trace + repost signals.

As such, the only place where trace + repost of signals can happen now
is userret().  Nevertheless, CURSIG() still decides not to ignore a
currently ignored signal and rather lets the kernel unwind until this
signal arrives in the CURSIG_TRACE() called from userret().

5 years agosignals: stop all threads of a process before taking a checkpoint
Simon Schubert [Sat, 7 Mar 2009 16:35:02 +0000 (17:35 +0100)]
signals: stop all threads of a process before taking a checkpoint

If we want to checkpoint a multi-threaded process, we need to wait until
the process is in a quiescent state, otherwise our checkpoint might be

5 years agostay in tstop() as long as the process is stopped
Simon Schubert [Sat, 7 Mar 2009 16:54:37 +0000 (17:54 +0100)]
stay in tstop() as long as the process is stopped

Under some conditions (mainly related to multi-threaded processes and
tracing (gdb)), wakeups, scheduling and stops can lead to a race which
will leave the process stopped and wait()ed, but the P_WAITED flag
cleared.  This happens because a thread in tstop() might have been woken
up, but not yet scheduled.  If the process in turn would get stopped
again (another bug), the thread in tstop() would be counted as stopped,
but would only be waiting to be scheduled to transition into LSRUN.

Prevent this by checking for SSLEEP in tstop() before returning.

5 years agodon't loop printing the diagnostic "waiting for lwps to exit"
Simon Schubert [Sat, 7 Mar 2009 16:37:16 +0000 (17:37 +0100)]
don't loop printing the diagnostic "waiting for lwps to exit"

This diagnostic never was really useful and only clutters the message
buffer.  Also don't poll the process state once a second, but rely on
the wakeups from exiting threads.

5 years agoemx(4): Add tunable to enable/disable multi-RX queue support
Sepherosa Ziehau [Mon, 9 Mar 2009 13:13:59 +0000 (21:13 +0800)]
emx(4): Add tunable to enable/disable multi-RX queue support

Multi-RX queue support is disabled on UP kernel, even if this
tunable is enabled.

5 years agoemx(4): Add multi-RX queue support
Sepherosa Ziehau [Sun, 8 Mar 2009 12:59:27 +0000 (20:59 +0800)]
emx(4): Add multi-RX queue support

5 years agoAdd an objcache(9) manual page.
Sascha Wildner [Mon, 9 Mar 2009 09:07:10 +0000 (10:07 +0100)]
Add an objcache(9) manual page.

Submitted-by: Stathis Kamperis <ekamperi@gmail.com>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1251>

5 years agoemx(4): Use E1000_ICR_ macros when check against value read from ICR
Sepherosa Ziehau [Sun, 8 Mar 2009 04:08:30 +0000 (12:08 +0800)]
emx(4): Use E1000_ICR_ macros when check against value read from ICR

5 years agoemx(4): this driver does not support 82543
Sepherosa Ziehau [Sun, 8 Mar 2009 03:51:38 +0000 (11:51 +0800)]
emx(4): this driver does not support 82543

5 years agoemx(4): Let the hardware strip the ethernet CRC on RX path
Sepherosa Ziehau [Sat, 7 Mar 2009 13:09:09 +0000 (21:09 +0800)]
emx(4): Let the hardware strip the ethernet CRC on RX path

5 years agoemx(4): Prepare multi-RX queue support -- use extended RX descriptor
Sepherosa Ziehau [Sat, 7 Mar 2009 11:29:59 +0000 (19:29 +0800)]
emx(4): Prepare multi-RX queue support -- use extended RX descriptor

5 years agoemx(4): Prepare multi-RX queue support -- use different struct for RX/TX buffer
Sepherosa Ziehau [Sat, 7 Mar 2009 05:08:34 +0000 (13:08 +0800)]
emx(4): Prepare multi-RX queue support -- use different struct for RX/TX buffer

Extended RX descriptor will be needed for multi-RX queue support.  However,
hardware will write information into RX buffer address field of extended
RX descriptors, so we will need to save "device visible" address in RX buffer.

5 years agoemx(4): Prepare multi-RX queue support -- group RX related fields together
Sepherosa Ziehau [Sat, 7 Mar 2009 04:01:11 +0000 (12:01 +0800)]
emx(4): Prepare multi-RX queue support -- group RX related fields together

5 years agoemx(4): Factor out emx_dma_{alloc,free}()
Sepherosa Ziehau [Fri, 6 Mar 2009 11:17:45 +0000 (19:17 +0800)]
emx(4): Factor out emx_dma_{alloc,free}()

5 years agoemx(4): Remove emx_dma_{malloc,free}() and related struct.
Sepherosa Ziehau [Thu, 5 Mar 2009 12:52:02 +0000 (20:52 +0800)]
emx(4): Remove emx_dma_{malloc,free}() and related struct.

5 years agoemx(4): Move TX/RX desc ring alloc/free into ring creation/destroy functions
Sepherosa Ziehau [Thu, 5 Mar 2009 11:49:28 +0000 (19:49 +0800)]
emx(4): Move TX/RX desc ring alloc/free into ring creation/destroy functions

5 years agoemx(4): Regroup RX/TX ring creation code
Sepherosa Ziehau [Thu, 5 Mar 2009 11:25:23 +0000 (19:25 +0800)]
emx(4): Regroup RX/TX ring creation code

5 years agoundo: don't run diff between last tid and tid_max
Simon Schubert [Fri, 6 Mar 2009 14:41:25 +0000 (15:41 +0100)]
undo: don't run diff between last tid and tid_max

Diff works on pairs of tids and not on only the first tid passed in to
the generator.  As a result, there is nothing to do for the last pair of
tids: the last tid and max_tid refer to the same version.  Avoid running
the generator in this case.

5 years agoundo: use MAX_TID for tid_max, or else HAMMER won't find the latest change
Simon Schubert [Fri, 6 Mar 2009 14:29:40 +0000 (15:29 +0100)]
undo: use MAX_TID for tid_max, or else HAMMER won't find the latest change

We should anyways use HAMMER_MAX_TID.  This also works around the bug in

5 years agoundo: for one-shot operations, pass in the last tid and not tid_max
Simon Schubert [Fri, 6 Mar 2009 14:26:46 +0000 (15:26 +0100)]
undo: for one-shot operations, pass in the last tid and not tid_max

This allows diff to print a sensible time of the last modification and
not print the start of the epoch.

5 years agocleanup: typo in comment
Simon Schubert [Wed, 4 Mar 2009 14:00:05 +0000 (15:00 +0100)]
cleanup: typo in comment

5 years agoktrdump: print ktr data using vfprintf()
Simon Schubert [Tue, 3 Mar 2009 17:23:48 +0000 (18:23 +0100)]
ktrdump: print ktr data using vfprintf()

The code previously assumed that there is a maximum of 10 arguments which
are all integer (sized).  Printing of more or differently sized arguments
seemed to work on occasion, or not.

5 years agoemx(4): Compact transmit path a little bit
Sepherosa Ziehau [Wed, 4 Mar 2009 13:31:32 +0000 (21:31 +0800)]
emx(4): Compact transmit path a little bit

- emx_buf.m_head is only set/cleared in the last emx_buf associated with
  the packet, so we don't need to keep clearing it in transmit descriptor
  setup loop.
- Used transmit descriptors do not need to be cleared in txeof and tx_collect

5 years agoem/emx(4): Remove dead code; add comment.
Sepherosa Ziehau [Wed, 4 Mar 2009 12:56:59 +0000 (20:56 +0800)]
em/emx(4): Remove dead code; add comment.

5 years agoem/emx(4): Don't use __predict_false when test m_len against EM_TXCSUM_MINHL
Sepherosa Ziehau [Wed, 4 Mar 2009 12:04:07 +0000 (20:04 +0800)]
em/emx(4): Don't use __predict_false when test m_len against EM_TXCSUM_MINHL

For 100 bytes UDP datagram written by userspace program, m_len is always
less then EM_TXCSUM_MINHL.

5 years agoem/emx(4): Fix comment
Sepherosa Ziehau [Wed, 4 Mar 2009 11:05:16 +0000 (19:05 +0800)]
em/emx(4): Fix comment

5 years agoGet rid of iwicontrol(8)
Sepherosa Ziehau [Tue, 3 Mar 2009 11:35:49 +0000 (19:35 +0800)]
Get rid of iwicontrol(8)

5 years agoUpdate iwi(4) manpage according to recent firmware upgrade.
Sepherosa Ziehau [Tue, 3 Mar 2009 10:58:03 +0000 (18:58 +0800)]
Update iwi(4) manpage according to recent firmware upgrade.

5 years agoiwi(4): Upgrade to use 3.0 firmware and use firmware(9) API to load firmware.
Sepherosa Ziehau [Tue, 3 Mar 2009 10:42:18 +0000 (18:42 +0800)]
iwi(4): Upgrade to use 3.0 firmware and use firmware(9) API to load firmware.

Submitted-by: Johannes Hofmann <johannes.hofmann@gmx.de>
5 years agoAllow the IP_MINTTL socket option to be set to zero.
Hasso Tepper [Mon, 2 Mar 2009 13:07:00 +0000 (15:07 +0200)]
Allow the IP_MINTTL socket option to be set to zero.

This disables the feature and is the default actually.

Reported-by: Nick Hilliard <nick at foobar.org>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1304>

5 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Mon, 2 Mar 2009 02:56:05 +0000 (18:56 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

5 years agodisklabel64 UFS+HAMMER boot support (was previously just HAMMER boot support)
Matthew Dillon [Mon, 2 Mar 2009 02:49:06 +0000 (18:49 -0800)]
disklabel64 UFS+HAMMER boot support (was previously just HAMMER boot support)

Create a mini-API for boot2 filesystems, split out the filesystem probe &
initialization code, and adjust boot2 to probe multiple filesystems.  While
the coding is fairly generic, only the larger boot2 area in a disklabel64
is big enough to hold a multi-filesystem boot2.  32 bit disklabels can still
only boot from UFS.

As part of this work the BTX loader offset for boot2 had to be adjusted.
boot1 used to load boot2 at 0xA000+0x4000 = 0xE000, but this left only 8KB
available before the segment would overflow in boot1's relocation code.

The BOOT2_VORIGIN was adjusted downward from 0x4000 to 0x2000, reducing
the absolute physical load address for boot2 to 0xC000 and allowing us
to load up to a 16K boot2 without overflowing the segment.

5 years agoFix checkpt's thaw failure error message.
Matthew Dillon [Sun, 1 Mar 2009 18:37:35 +0000 (10:37 -0800)]
Fix checkpt's thaw failure error message.

5 years agoem(4): Give preference to emx(4) based on PCI ids.
Sepherosa Ziehau [Sun, 1 Mar 2009 10:04:43 +0000 (18:04 +0800)]
em(4): Give preference to emx(4) based on PCI ids.

5 years agoCopy em(4) to emx(4), which supports only 8257{1,2,3} parts.
Sepherosa Ziehau [Sun, 1 Mar 2009 09:14:58 +0000 (17:14 +0800)]
Copy em(4) to emx(4), which supports only 8257{1,2,3} parts.

The reasons to create another driver for 8257{1,2,3}:
- Various old hardware bug workaround code are removed, so the
  code is more straightforward, especially on the transmit path.
- Only 8257{1,2,3} support multi RX queues.
- Only 8257{1,2} support multi TX queues (no plan for it yet).
- It could be a sandbox for me to add multi queues support, while
  em(4) always works :).

5 years agoem(4): Put back pkt_txclean KTR
Sepherosa Ziehau [Sun, 1 Mar 2009 09:35:56 +0000 (17:35 +0800)]
em(4): Put back pkt_txclean KTR

5 years agoem(4): We don't need in_detach trick.
Sepherosa Ziehau [Sun, 1 Mar 2009 09:32:24 +0000 (17:32 +0800)]
em(4): We don't need in_detach trick.

5 years agoem(4): Fix comment
Sepherosa Ziehau [Sun, 1 Mar 2009 09:31:37 +0000 (17:31 +0800)]
em(4): Fix comment

5 years agoem(4): We return 0 or errno, but not Intel e1000's error code.
Sepherosa Ziehau [Sun, 1 Mar 2009 09:30:19 +0000 (17:30 +0800)]
em(4): We return 0 or errno, but not Intel e1000's error code.

5 years agoem(4): White space
Sepherosa Ziehau [Sun, 1 Mar 2009 09:29:16 +0000 (17:29 +0800)]
em(4): White space

5 years agoSmall adjustment to committer(7): cherry-pick takes one argument.
Sascha Wildner [Sun, 1 Mar 2009 07:34:34 +0000 (08:34 +0100)]
Small adjustment to committer(7): cherry-pick takes one argument.

5 years agoAdjust checkpoint restore to use same note order as coredumps.
Matthew Dillon [Sun, 1 Mar 2009 07:26:20 +0000 (23:26 -0800)]
Adjust checkpoint restore to use same note order as coredumps.

Recent changes to the coredump code broke the checkpoint restore
code (checkpt -r) due to reordering of the ELF notes.  Adjust the
checkpoint restore code to deal with the new ordering.

Reported-by: Samuel J. Greear <sjg@evilcode.net>
5 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sun, 1 Mar 2009 03:11:55 +0000 (19:11 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

5 years agoHAMMER VFS - Fix improper cred checks for utimes()
Matthew Dillon [Sat, 28 Feb 2009 23:30:30 +0000 (15:30 -0800)]
HAMMER VFS - Fix improper cred checks for utimes()

Adjust the kern_utimes() code in the kernel to check for write permissions
prior to diving into the VFS.  UFS checks for write perms but HAMMER doesn't.
Generally speaking we want (at least for now) the kernel to do as much of
these checks as possible.

Reported-by: YONETANI Tomokazu <qhwt+dfly@les.ath.cx>
5 years agoMention commit template in committer.7.
Nicolas Thery [Sat, 28 Feb 2009 23:28:08 +0000 (00:28 +0100)]
Mention commit template in committer.7.

5 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sat, 28 Feb 2009 18:00:13 +0000 (10:00 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly