dragonfly.git
5 years agodf(1): Fix amd64 warnings (type widths).
Sascha Wildner [Thu, 26 Feb 2009 04:54:04 +0000 (05:54 +0100)]
df(1): Fix amd64 warnings (type widths).

Taken-from: FreeBSD

5 years agoHAMMER Utiliites: undo can now detect all prior replacements of a file.
Matthew Dillon [Wed, 25 Feb 2009 23:59:56 +0000 (15:59 -0800)]
HAMMER Utiliites: undo can now detect all prior replacements of a file.

The undo code will now iterate the history of the parent directory and
attempt to locate all versions of the requested file even if the inode
number changes due to the file being deleted and recreated, or
renamed-over.

undo -i attempts to show inode number changes and deletions in the list.

undo -a (-d/-D) is now able to span inode number changes.

Suggested-by: corecode
5 years agoHAMMER VFS: Allow the form ".@@<snapshot>"
Matthew Dillon [Wed, 25 Feb 2009 22:27:44 +0000 (14:27 -0800)]
HAMMER VFS:  Allow the form ".@@<snapshot>"

Normally "." is processed by the kernel, but since extended snapshot
filenames are handled by the VFS trying to access a snapshot of "."
is passed through.  Handle it properly.

Note that the "..@@<snapshot>" form is not handled.

5 years agoHAMMER Utilities: Use a Red-Black tree to track HAMMER TIDs, use diff -N
Matthew Dillon [Wed, 25 Feb 2009 22:24:23 +0000 (14:24 -0800)]
HAMMER Utilities: Use a Red-Black tree to track HAMMER TIDs, use diff -N

Begin using a red-black tree to track the TIDs used to generate diff sets.

Use diff -N to deal with pre-creation/post-creation undo diffs.

Use diff -r.  However, running undo -a -d on a directory is not yet
meaningful because only the directory TIDs are used right now.

5 years agoRemove the horribly designed RB_AUGMENT.
Matthew Dillon [Wed, 25 Feb 2009 22:16:15 +0000 (14:16 -0800)]
Remove the horribly designed RB_AUGMENT.

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

5 years agoHAMMER VFS: Add missing hammer_rel_volume() call in deadlock/retry case.
Matthew Dillon [Wed, 25 Feb 2009 18:39:42 +0000 (10:39 -0800)]
HAMMER VFS: Add missing hammer_rel_volume() call in deadlock/retry case.

A late collision in hammer_get_buffer() could result in a ref count leak
on a hammer_volume structure.  Fix the leak.

5 years agoHAMMER Utility: Allow -b to specify bytes per second if no suffix is supplied
Matthew Dillon [Wed, 25 Feb 2009 17:32:36 +0000 (09:32 -0800)]
HAMMER Utility: Allow -b to specify bytes per second if no suffix is supplied

5 years agoAllow fractional delay specs for iostats and bstats, set lower limit to 0.001.
Matthew Dillon [Wed, 25 Feb 2009 17:20:00 +0000 (09:20 -0800)]
Allow fractional delay specs for iostats and bstats, set lower limit to 0.001.

Suggested-by: cmpgt <cmpgt00@gmail.com>
5 years agodntpd(8): Fix amd64 warnings.
Sascha Wildner [Wed, 25 Feb 2009 14:21:48 +0000 (15:21 +0100)]
dntpd(8): Fix amd64 warnings.

5 years agopctrack(8): Fix amd64 warnings.
Sascha Wildner [Wed, 25 Feb 2009 14:21:01 +0000 (15:21 +0100)]
pctrack(8): Fix amd64 warnings.

5 years agosockstat(1): Fix amd64 warnings.
Sascha Wildner [Wed, 25 Feb 2009 14:21:25 +0000 (15:21 +0100)]
sockstat(1): Fix amd64 warnings.

5 years agorconfig(8): Fix amd64 warnings.
Sascha Wildner [Wed, 25 Feb 2009 14:20:33 +0000 (15:20 +0100)]
rconfig(8): Fix amd64 warnings.

5 years agoinit(8): Fix amd64 warnings.
Sascha Wildner [Wed, 25 Feb 2009 14:20:09 +0000 (15:20 +0100)]
init(8): Fix amd64 warnings.

5 years agodisklabel(8): Fix amd64 warnings.
Sascha Wildner [Wed, 25 Feb 2009 14:19:46 +0000 (15:19 +0100)]
disklabel(8): Fix amd64 warnings.

5 years agopax(1): Raise WARNS to 2.
Sascha Wildner [Tue, 24 Feb 2009 21:58:10 +0000 (22:58 +0100)]
pax(1): Raise WARNS to 2.

5 years agodma(8): Raise WARNS to 6.
Sascha Wildner [Tue, 24 Feb 2009 22:00:55 +0000 (23:00 +0100)]
dma(8): Raise WARNS to 6.

5 years agosystat(1): Fix 'systat -ip' support
Sepherosa Ziehau [Tue, 24 Feb 2009 11:26:54 +0000 (19:26 +0800)]
systat(1): Fix 'systat -ip' support

Based-on: related implementation in netstat(1)
Reported-by: ruse39 on EFNET #dragonflybsd
5 years agoem(4): Correct the conditions to be asserted
Sepherosa Ziehau [Sat, 21 Feb 2009 05:36:30 +0000 (13:36 +0800)]
em(4): Correct the conditions to be asserted

5 years agoem(4): Turn on/off SPEED_MODE according to the current link speed.
Sepherosa Ziehau [Fri, 20 Feb 2009 14:00:32 +0000 (22:00 +0800)]
em(4): Turn on/off SPEED_MODE according to the current link speed.

5 years agoem(4): Avoid allocating a csum offloading TX desc whenever possible.
Sepherosa Ziehau [Fri, 20 Feb 2009 11:21:53 +0000 (19:21 +0800)]
em(4): Avoid allocating a csum offloading TX desc whenever possible.

According to Intel's PCIe GbE Controllers Open Source Software
Developer's Manual Revision 1.8: a csum offloading TX desc will
prevent TX data read requests from being pipelined, thus reduce TX
performance.  The pipelining effect is not obvious when transmitting
bulk data (e.g. 1472 bytes UDP datagram), but it could be dominant
when transmitting tiny packets.  So we should avoid allocating a
csum offloading TX desc whenever possible to take advantage of the
pipelining effect.

On 82573E_IAMT,
Before this commit: ~700Kpps
After this commit:  ~990Kpps

The funny thing about this commit is:
Old driver code from Intel's FreeBSD driver 6.2.9 roughly did what
we are doing in this commit, while Intel's FreeBSD driver 6.9.6
simply follows Linux's way to flush the performance to the toilet ...

5 years agopktgen: Put -DSMP under '.ifdef SMP'
Sepherosa Ziehau [Thu, 19 Feb 2009 14:45:21 +0000 (22:45 +0800)]
pktgen: Put -DSMP under '.ifdef SMP'

5 years agoem(4): Free incomplete received packet in em_stop().
Sepherosa Ziehau [Wed, 18 Feb 2009 10:38:24 +0000 (18:38 +0800)]
em(4): Free incomplete received packet in em_stop().

5 years agoem(4): Put back the workaround and related comment for 82542 rev2
Sepherosa Ziehau [Tue, 17 Feb 2009 12:58:57 +0000 (20:58 +0800)]
em(4): Put back the workaround and related comment for 82542 rev2

5 years agoem(4): On TX path, make sure that ether header and ip.ip_hl are contiguous.
Sepherosa Ziehau [Mon, 16 Feb 2009 15:12:31 +0000 (23:12 +0800)]
em(4): On TX path, make sure that ether header and ip.ip_hl are contiguous.

This must be done mainly because if hardware TX csum offloading is enabled,
setting up context TX descriptor will need to access ip.ip_hl.

5 years agoem(4): Sync with Intel's em-6.9.6(FreeBSD)
Sepherosa Ziehau [Sun, 15 Feb 2009 11:46:46 +0000 (19:46 +0800)]
em(4): Sync with Intel's em-6.9.6(FreeBSD)

In addition to adding support for some chips (e.g. 82574L), this also gives
me the chance to rearrange and clean up if_em.[ch] :)

Noticable changes to the FreeBSD driver:
- The hardware abstraction layer is put into a seperate module (ig_hal)
- IP csum offloading is supported when hardware TX csum offloading is enabled
- mbufs on RX/TX ring are freed in em_stop(), i.e. during "ifconfig emX down"
- TX pattern is adjusted that we test number of avaiable TX descs before
  dequeuing mbuf from ifq.  We also reserve double spare TX descs for 82544
  cards on PCI-X bus, so we will not need to unload the loaded mbuf in the
  mid way due to short of TX descs; this at least makes the logic a little
  bit simpler.

5 years agoAdd git commit template
Matthias Schmidt [Mon, 23 Feb 2009 22:16:30 +0000 (23:16 +0100)]
Add git commit template

Rename the old CVS template and add it to the repo.  As git is a DSCM
you have to install the template yourself.  Just use the following
command:

git config --add commit.template /usr/src/tools/gittemplate

5 years agomount_udf(8): Raise WARNS to 6 and fix warning.
Sascha Wildner [Tue, 24 Feb 2009 03:29:25 +0000 (04:29 +0100)]
mount_udf(8): Raise WARNS to 6 and fix warning.

5 years agodhclient(8): Raise WARNS to 2 and fix a warning.
Sascha Wildner [Tue, 24 Feb 2009 02:24:28 +0000 (03:24 +0100)]
dhclient(8): Raise WARNS to 2 and fix a warning.

5 years agolibstand: Raise WARNS to 2 and fix warnings.
Sascha Wildner [Tue, 24 Feb 2009 01:58:49 +0000 (02:58 +0100)]
libstand: Raise WARNS to 2 and fix warnings.

5 years agolibpthread: Raise WARNS to 6 :)
Sascha Wildner [Tue, 24 Feb 2009 01:22:48 +0000 (02:22 +0100)]
libpthread: Raise WARNS to 6 :)

5 years agolibdevstat: Raise WARNS to 6 and fix warnings.
Sascha Wildner [Tue, 24 Feb 2009 01:14:32 +0000 (02:14 +0100)]
libdevstat: Raise WARNS to 6 and fix warnings.

5 years agolibbluetooth: Raise WARNS to 6.
Sascha Wildner [Tue, 24 Feb 2009 01:02:03 +0000 (02:02 +0100)]
libbluetooth: Raise WARNS to 6.

5 years agolibusbhid: Raise WARNS to 6.
Sascha Wildner [Tue, 24 Feb 2009 00:52:16 +0000 (01:52 +0100)]
libusbhid: Raise WARNS to 6.

5 years agoFix side-effect of a80e869f; -net 0.0.0.0 has been treated as 0.0.0.0/32.
YONETANI Tomokazu [Mon, 23 Feb 2009 14:35:04 +0000 (23:35 +0900)]
Fix side-effect of a80e869f; -net 0.0.0.0 has been treated as 0.0.0.0/32.
Also bring the rest of the relavant fix r187384 from FreeBSD.

5 years agobuild(7): Mention development(7) in the description.
Sascha Wildner [Mon, 23 Feb 2009 12:43:55 +0000 (13:43 +0100)]
build(7): Mention development(7) in the description.

5 years agoSilence some pointer arithmetic warnings in the kernel.
Sascha Wildner [Mon, 23 Feb 2009 11:21:11 +0000 (12:21 +0100)]
Silence some pointer arithmetic warnings in the kernel.

5 years agoumodem(4) depends on ucom(4).
Sascha Wildner [Mon, 23 Feb 2009 11:19:38 +0000 (12:19 +0100)]
umodem(4) depends on ucom(4).

5 years agorpc(3): Adjust the manual page's struct XDR to reality.
Sascha Wildner [Mon, 23 Feb 2009 09:47:54 +0000 (10:47 +0100)]
rpc(3): Adjust the manual page's struct XDR to reality.

5 years agomsdosfs: remove useless code.
Nicolas Thery [Sat, 21 Feb 2009 22:09:18 +0000 (23:09 +0100)]
msdosfs: remove useless code.

5 years agocommitter(7): Add some lines about MFCing.
Sascha Wildner [Sun, 22 Feb 2009 08:46:13 +0000 (09:46 +0100)]
committer(7): Add some lines about MFCing.

5 years agoPotential fix for panic during shutdown.
Nicolas Thery [Sat, 21 Feb 2009 12:05:27 +0000 (13:05 +0100)]
Potential fix for panic during shutdown.

When a tty is revoked, the opencount of its associated vnode is forced to
zero and calling vop_stdclose() on this vnode causes a panic.  Call therefore
vop_stdclose() from spec_close() if and only if the opencount is strictly
positive.

I haven't managed to reproduce the original panic locally, hence the
"potential" above.

Reported-by: Thomas Nikolajsen <thomas.nikolajsen@mail.dk>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue715>

5 years agomsdosfs: replace bzero() with M_ZERO.
Nicolas Thery [Sat, 21 Feb 2009 10:39:04 +0000 (11:39 +0100)]
msdosfs: replace bzero() with M_ZERO.

5 years agoinstaller: Re-add the TEST_DEV command which was removed accidentally.
Sascha Wildner [Sat, 21 Feb 2009 08:52:43 +0000 (09:52 +0100)]
installer: Re-add the TEST_DEV command which was removed accidentally.

This should make command_add_ensure_dev() work again (to test if a
partition exists and create it if it doesn't).

Reported-by: M.K. <mk@freeweb.ozi.nu>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1292>

5 years agoasf(8): Fix example and clean up a bit.
Sascha Wildner [Sat, 21 Feb 2009 08:39:44 +0000 (09:39 +0100)]
asf(8): Fix example and clean up a bit.

While here, remove 's' from getopt() in asf.c since we do not support that
option (yet).

5 years agoamr: style(9)
Sascha Wildner [Fri, 20 Feb 2009 15:10:12 +0000 (16:10 +0100)]
amr: style(9)

5 years agoSync with FreeBSD
Matthias Schmidt [Fri, 20 Feb 2009 14:31:07 +0000 (15:31 +0100)]
Sync with FreeBSD

5 years agomake/Makefile: Adjust hash table creation for pkgsrc.
Sascha Wildner [Fri, 20 Feb 2009 12:15:15 +0000 (13:15 +0100)]
make/Makefile: Adjust hash table creation for pkgsrc.

5 years agomake/Makefile: Remove CVS id handling.
Sascha Wildner [Fri, 20 Feb 2009 10:19:27 +0000 (11:19 +0100)]
make/Makefile: Remove CVS id handling.

5 years agomakesyscalls.sh: Remove CVS id handling and clean up a bit.
Sascha Wildner [Fri, 20 Feb 2009 10:08:42 +0000 (11:08 +0100)]
makesyscalls.sh: Remove CVS id handling and clean up a bit.

5 years agoConstify yp_dir in various places (unbreaks buildworld).
Sascha Wildner [Thu, 19 Feb 2009 23:35:40 +0000 (00:35 +0100)]
Constify yp_dir in various places (unbreaks buildworld).

5 years agorpcgen(1): Raise WARNS to 6.
Sascha Wildner [Thu, 19 Feb 2009 21:49:43 +0000 (22:49 +0100)]
rpcgen(1): Raise WARNS to 6.

5 years agoypmatch(1): Raise WARNS to 6 & fix warnings.
Sascha Wildner [Thu, 19 Feb 2009 20:57:31 +0000 (21:57 +0100)]
ypmatch(1): Raise WARNS to 6 & fix warnings.

5 years agonl(1): Raise WARNS to 6 & fix warnings.
Sascha Wildner [Thu, 19 Feb 2009 20:54:08 +0000 (21:54 +0100)]
nl(1): Raise WARNS to 6 & fix warnings.

5 years agoypcat(1): Raise WARNS to 6 & fix warnings.
Sascha Wildner [Thu, 19 Feb 2009 16:53:34 +0000 (17:53 +0100)]
ypcat(1): Raise WARNS to 6 & fix warnings.

5 years agoRemove cxconfig, which was never compiled and never installed.
Sascha Wildner [Thu, 19 Feb 2009 13:23:59 +0000 (14:23 +0100)]
Remove cxconfig, which was never compiled and never installed.

5 years agoypxfr(8): Ansify, raise WARNS to 3, fix warnings.
Sascha Wildner [Thu, 19 Feb 2009 11:00:30 +0000 (12:00 +0100)]
ypxfr(8): Ansify, raise WARNS to 3, fix warnings.

5 years agoman9/Makefile: Add missing backslash.
Sascha Wildner [Thu, 19 Feb 2009 10:03:32 +0000 (11:03 +0100)]
man9/Makefile: Add missing backslash.

5 years agoAdd an ioctl(9) manual page.
Sascha Wildner [Thu, 19 Feb 2009 09:30:16 +0000 (10:30 +0100)]
Add an ioctl(9) manual page.

Adapted-from: NetBSD
Submitted-by: Stathis Kamperis <ekamperi@gmail.com>
5 years agoHAMMER Utilities: Fix @@ formatting used by undo -ad and fix duplicate test
Matthew Dillon [Wed, 18 Feb 2009 22:33:11 +0000 (14:33 -0800)]
HAMMER Utilities: Fix @@ formatting used by undo -ad and fix duplicate test

Reported-by: Brad Frank <brad.frank@gmail.com>
5 years agoLiveDVD: Fix installer when it is run in the console.
Sascha Wildner [Wed, 18 Feb 2009 15:03:10 +0000 (16:03 +0100)]
LiveDVD: Fix installer when it is run in the console.

The LiveDVD was recently changed to not auto-start X11 anymore, meaning
the installer can now be run from within X11 (after manually starting
it) or from the console. However, the latter case requires ttyv1 to be
free because the console installer will log stuff on ttyv1. When started
from X11, this output goes to a different window (which is why ttyv1
was configured normally on the LiveDVD).

Reported-by: matthias
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1289>

5 years agofsck_msdosfs: check next cluster index for validity before using it
Simon Schubert [Wed, 18 Feb 2009 10:57:53 +0000 (11:57 +0100)]
fsck_msdosfs: check next cluster index for validity before using it

The boot->FSNext index can wind up to be out of range, thus leading to a
segfault when trying to check whether it is pointing to a free cluster.
Check for it being in range before using it as an index into the fat
array.

5 years agoFix warning in kernel.
Nicolas Thery [Mon, 16 Feb 2009 21:37:26 +0000 (22:37 +0100)]
Fix warning in kernel.

5 years agoFix typo.
Nicolas Thery [Mon, 16 Feb 2009 21:03:21 +0000 (22:03 +0100)]
Fix typo.

5 years agogetent(1): Raise WARNS to 6.
Sascha Wildner [Tue, 17 Feb 2009 15:21:40 +0000 (16:21 +0100)]
getent(1): Raise WARNS to 6.

5 years agotruncate(1): Raise WARNS to 6 and fix all warnings.
Sascha Wildner [Tue, 17 Feb 2009 15:18:33 +0000 (16:18 +0100)]
truncate(1): Raise WARNS to 6 and fix all warnings.

5 years agofind(1): Raise WARNS to 6 and fix all warnings.
Sascha Wildner [Tue, 17 Feb 2009 15:13:47 +0000 (16:13 +0100)]
find(1): Raise WARNS to 6 and fix all warnings.

5 years agofinger(1): Raise WARNS to 6 and fix all warnings.
Sascha Wildner [Tue, 17 Feb 2009 15:09:26 +0000 (16:09 +0100)]
finger(1): Raise WARNS to 6 and fix all warnings.

5 years agoRemove WARNS?=6 from Makefiles where it is already in ../Makefile.inc.
Sascha Wildner [Tue, 17 Feb 2009 14:56:34 +0000 (15:56 +0100)]
Remove WARNS?=6 from Makefiles where it is already in ../Makefile.inc.

5 years agom4(1): Oops, WARNS?=6 is in usr.bin/Makefile.inc already.
Sascha Wildner [Tue, 17 Feb 2009 14:51:42 +0000 (15:51 +0100)]
m4(1): Oops, WARNS?=6 is in usr.bin/Makefile.inc already.

5 years agom4(1): Raise WARNS to 6 and fix warnings.
Sascha Wildner [Tue, 17 Feb 2009 14:50:01 +0000 (15:50 +0100)]
m4(1): Raise WARNS to 6 and fix warnings.

5 years agoroute: Replicate mask_rnhead to each CPU; unbreak genmask support.
Sepherosa Ziehau [Sat, 7 Feb 2009 04:51:35 +0000 (12:51 +0800)]
route: Replicate mask_rnhead to each CPU; unbreak genmask support.

- mask_rnhead stores netmask and is read-write accessed by the per-cpu
  routing functions, so its replication is necessary.
- Unbreak genmask support by always adding genmask at the beginning of
  the route_output() and searching for the per-cpu genmask before
  assigning it to the per-cpu rtentry.

5 years agobacktrace: Use print_backtrace()
Sepherosa Ziehau [Fri, 6 Feb 2009 11:37:24 +0000 (19:37 +0800)]
backtrace: Use print_backtrace()

5 years agoroute: Suppress duplicated rtmsgs on ARP input path.
Sepherosa Ziehau [Mon, 2 Feb 2009 12:08:57 +0000 (20:08 +0800)]
route: Suppress duplicated rtmsgs on ARP input path.

5 years agoroute: Suppress duplicated rtmsgs on route_output(RTM_CHANGE) path
Sepherosa Ziehau [Mon, 2 Feb 2009 10:59:23 +0000 (18:59 +0800)]
route: Suppress duplicated rtmsgs on route_output(RTM_CHANGE) path

5 years agoroute: Suppress duplicated rtmsgs generated by rtlookup() in rt_setgate()
Sepherosa Ziehau [Mon, 2 Feb 2009 09:56:48 +0000 (17:56 +0800)]
route: Suppress duplicated rtmsgs generated by rtlookup() in rt_setgate()

Add 'generate_report' parameter to rt_setgate().  In rt_setgate(), instead
of passing RTL_REPORTMSG to rtlookup(), we pass 'generated_report' to
rtlookup().

For rtrequset1(RTM_ADD) and rtredirect(), which always go through all CPUs,
we only need to generate rtmsg on CPU0.  For {arp,atm,nd6}_rtrequest(),
there is no need to generated rtmsg.

5 years agortsock: Fill in the correct rtm_index for RTM_ADD and RTM_CHANGE messages.
Sepherosa Ziehau [Sun, 1 Feb 2009 04:02:16 +0000 (12:02 +0800)]
rtsock: Fill in the correct rtm_index for RTM_ADD and RTM_CHANGE messages.

Obtained-from: OpenBSD via FreeBSD (part of net/rtsock.c rev1.133)

5 years agortsock: Use M_ASSERTPKTHDR()
Sepherosa Ziehau [Sun, 1 Feb 2009 03:18:29 +0000 (11:18 +0800)]
rtsock: Use M_ASSERTPKTHDR()

5 years agortsock: Break long line
Sepherosa Ziehau [Sun, 1 Feb 2009 03:16:21 +0000 (11:16 +0800)]
rtsock: Break long line

5 years agortsock: Fill in the rtm_index field whenever we have an interface pointer.
Sepherosa Ziehau [Sun, 1 Feb 2009 03:13:45 +0000 (11:13 +0800)]
rtsock: Fill in the rtm_index field whenever we have an interface pointer.

Obtained-from: FreeBSD (net/rtsock.c rev1.123)

5 years agortsock: White space
Sepherosa Ziehau [Sun, 1 Feb 2009 03:07:24 +0000 (11:07 +0800)]
rtsock: White space

5 years agortsock: Use rtsearch_global() for RTM_GET
Sepherosa Ziehau [Sat, 31 Jan 2009 10:33:42 +0000 (18:33 +0800)]
rtsock: Use rtsearch_global() for RTM_GET

5 years agortsock: Unbreak RTM_LOCK support by using rtsearch_global()
Sepherosa Ziehau [Sat, 31 Jan 2009 10:08:25 +0000 (18:08 +0800)]
rtsock: Unbreak RTM_LOCK support by using rtsearch_global()

5 years agoroute: Add rtsearch_global(), which is used to fix RTM_CHANGE support.
Sepherosa Ziehau [Sat, 31 Jan 2009 09:54:12 +0000 (17:54 +0800)]
route: Add rtsearch_global(), which is used to fix RTM_CHANGE support.

rtsearch_global() forwards a netmsg to each CPUs.  On each CPU, it
uses radix tree lookup function to locate the requested route, if the
route is found, then call the passed in callback.  The callback could
return error thus terminate the message forwarding.  If the requested
route was not found on any of the CPUs, then ESRCH is replied on the
last CPU.

5 years agortsock: Minor style change
Sepherosa Ziehau [Sat, 31 Jan 2009 05:26:18 +0000 (13:26 +0800)]
rtsock: Minor style change

5 years agortsock: Fix a reversed condition
Sepherosa Ziehau [Sat, 31 Jan 2009 05:16:59 +0000 (13:16 +0800)]
rtsock: Fix a reversed condition

5 years agortsock: Fix !SO_USELOOPBACK support in route_output()
Sepherosa Ziehau [Sat, 31 Jan 2009 04:07:32 +0000 (12:07 +0800)]
rtsock: Fix !SO_USELOOPBACK support in route_output()

Old BSD code assumes that rts_input() is synchronous, so clear/set
sp_family could be used to skip the current rawcb.  However, our
rts_input() is asynchronous, thus the clear/set sp_family trick no
longer takes any effect.

Reimplement the rawcb skipping in the following way:
- Record the address of rawcb to be skipped in netmsg.
- Extend raw_input() interface to accept a 'skip' argument.  At the
  beginning of the rawcb list iteration, check the address of the
  current rawcb against the 'skip'.

5 years agobusdma(9): Dup i386 busdma_machdep.c to vkernel
Sepherosa Ziehau [Thu, 29 Jan 2009 11:25:37 +0000 (19:25 +0800)]
busdma(9): Dup i386 busdma_machdep.c to vkernel

5 years agobusdma(9): Dup i386 busdma_machdep.c to amd64
Sepherosa Ziehau [Thu, 29 Jan 2009 11:24:33 +0000 (19:24 +0800)]
busdma(9): Dup i386 busdma_machdep.c to amd64

5 years agoUnbreak LINT build
Sepherosa Ziehau [Thu, 29 Jan 2009 10:51:10 +0000 (18:51 +0800)]
Unbreak LINT build

5 years agosis(4): Rework busdma(9) related bits
Sepherosa Ziehau [Thu, 29 Jan 2009 08:25:56 +0000 (16:25 +0800)]
sis(4): Rework busdma(9) related bits

- RX/TX descriptor rings need to be 4bytes aligned.
- RX buffers need to be 4bytes aligned.
- Create TX/RX buffer busdma map at attaching time and destroy them
  at detaching time.
- Rework sis_newbuf() by utilizing bus_dmamap_load_mbuf_segment().
- Factor sis_setup_rxdesc() out of sis_newbuf() and call it on RX
  error handling path.
- Rework sis_encap() by utilizing bus_dmamap_load_mbuf_defrag().
- Correct IFF_OACTIVE handling in sis_start()/sis_txeof().

5 years agosis(4): Move software specific fields out of hardware descriptor structure
Sepherosa Ziehau [Thu, 29 Jan 2009 03:39:40 +0000 (11:39 +0800)]
sis(4): Move software specific fields out of hardware descriptor structure

5 years agobce(4): Remove unnecessary bus_dmamap_sync()
Sepherosa Ziehau [Wed, 28 Jan 2009 12:16:51 +0000 (20:16 +0800)]
bce(4): Remove unnecessary bus_dmamap_sync()

5 years agobce(4): Adjust RX path to avoid fatal error caused by busdma failure
Sepherosa Ziehau [Tue, 27 Jan 2009 14:53:18 +0000 (22:53 +0800)]
bce(4): Adjust RX path to avoid fatal error caused by busdma failure

- Create tmp busdma map for loading mbuf on RX path, so busdma map
  loading failure will not be fatal.
- Don't unload RX buffer's busdma map until we could make sure that
  new RX buffer could be loaded.
- On RX path, if error happens, we only need to reconfigure RX desc,
  so just call bce_setup_rxdesc_std().
- Make sure that sw_chain_cons and sw_chain_prod are same, else
  log error and reconfigure the RX desc indiced by sw_chain_cons.
- Utilize bus_dmamap_load_mbuf_segment().

5 years agobce(4): Factor RX desc setup out of bce_newbuf_std()
Sepherosa Ziehau [Tue, 27 Jan 2009 09:00:27 +0000 (17:00 +0800)]
bce(4): Factor RX desc setup out of bce_newbuf_std()

5 years agobce(4): Utilize bus_dmamap_load_mbuf_defrag()
Sepherosa Ziehau [Tue, 27 Jan 2009 05:05:12 +0000 (13:05 +0800)]
bce(4): Utilize bus_dmamap_load_mbuf_defrag()

5 years agobce(4): Use coherent for non-buffer data storage
Sepherosa Ziehau [Tue, 27 Jan 2009 04:37:30 +0000 (12:37 +0800)]
bce(4): Use coherent for non-buffer data storage

- Utilize bus_dmamem_coherent_any()
- Put RX/TX pages into coherent memory
- Don't sync coherent memory

5 years agobce(4): Correct parameters passed to busdma(9) functions
Sepherosa Ziehau [Tue, 27 Jan 2009 03:20:33 +0000 (11:20 +0800)]
bce(4): Correct parameters passed to busdma(9) functions

5 years agostge(4): Remove unnecessary bus_dmamap_sync()
Sepherosa Ziehau [Mon, 26 Jan 2009 14:07:10 +0000 (22:07 +0800)]
stge(4): Remove unnecessary bus_dmamap_sync()

5 years agostge(4): Adjust TX path
Sepherosa Ziehau [Mon, 26 Jan 2009 13:53:25 +0000 (21:53 +0800)]
stge(4): Adjust TX path

- Utilize bus_dmamap_load_mbuf_defrag()
- Sync TX buffer before setup the TX desc
- In stge_{txeof,start}(), use the same condition to clear/set IFF_OACTIVE