]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoMerge OpenSolaris revision 9365:7838a22eccd6:
Xin LI [Tue, 16 Mar 2010 00:49:37 +0000 (00:49 +0000)]
Merge OpenSolaris revision 9365:7838a22eccd6:

PSARC/2009/171 zfs list -d and zfs get -d
6762432 zfs list --depth

PR: bin/144720
Submitted by: mm
Approved by: pjd
Obtained from: OpenSolaris
MFC after: 1 month

14 years agoMerge OpenSolaris revision 8802:010b31dd4c53:
Xin LI [Tue, 16 Mar 2010 00:48:27 +0000 (00:48 +0000)]
Merge OpenSolaris revision 8802:010b31dd4c53:

6773366 "zfs list" memory consumption can be further reduced

PR: bin/144720
Submitted by: mm
Approved by: pjd
Obtained from: OpenSolaris
MFC after: 1 month

14 years agoFix a small bug in drbr_dequeue_cond spotted while preparing MFC of r203834.
Max Laier [Mon, 15 Mar 2010 21:15:03 +0000 (21:15 +0000)]
Fix a small bug in drbr_dequeue_cond spotted while preparing MFC of r203834.

MFC after: 3 days

14 years agoSwitch to our preferred license.
Joel Dahl [Mon, 15 Mar 2010 20:25:28 +0000 (20:25 +0000)]
Switch to our preferred license.

Approved by: Dirk-Willem Van Gulik <dirkx@webweaving.org>

14 years agoaccept lower case m as a synonym for Mega (bit/s or bytes/s).
Luigi Rizzo [Mon, 15 Mar 2010 18:26:09 +0000 (18:26 +0000)]
accept lower case m as a synonym for Mega (bit/s or bytes/s).

14 years agoprint correctly commands of the form
Luigi Rizzo [Mon, 15 Mar 2010 18:20:51 +0000 (18:20 +0000)]
print correctly commands of the form

ipfw add 100 allow ip from { 1.2.3.4 or 5.6.7.8 }

(note that the above example could be better written as

ipfw add 100 allow dst-ip 1.2.3.4,5.6.7.8

Submitted by: Riccardo Panicucci

14 years agosmall fixes to estimate the buffer size when requesting all pipes/flows.
Luigi Rizzo [Mon, 15 Mar 2010 18:09:21 +0000 (18:09 +0000)]
small fixes to estimate the buffer size when requesting all pipes/flows.

14 years ago+ implement (two lines) the kernel side of 'lookup dscp N' to use the
Luigi Rizzo [Mon, 15 Mar 2010 17:14:27 +0000 (17:14 +0000)]
+ implement (two lines) the kernel side of 'lookup dscp N' to use the
  dscp as a search key in table lookups;

+ (re)implement a sysctl variable to control the expire frequency of
  pipes and queues when they become empty;

+ add 'queue number' as optional part of the flow_id. This can be
  enabled with the command

        queue X config mask queue ...

  and makes it possible to support priority-based schedulers, where
  packets should be grouped according to the priority and not some
  fields in the 5-tuple.
  This is implemented as follows:
  - redefine a field in the ipfw_flow_id (in sys/netinet/ip_fw.h) but
    without changing the size or shape of the structure, so there are
    no ABI changes. On passing, also document how other fields are
    used, and remove some useless assignments in ip_fw2.c

  - implement small changes in the userland code to set/read the field;

  - revise the functions in ip_dummynet.c to manipulate masks so they
    also handle the additional field;

There are no ABI changes in this commit.

14 years agoHave cpu_throw() loop on blocked_lock as well. This bug has existed
Marcel Moolenaar [Mon, 15 Mar 2010 16:53:09 +0000 (16:53 +0000)]
Have cpu_throw() loop on blocked_lock as well. This bug has existed
a long time and has gone unnoticed just as long, because I kept
using sched_4bsd (due to sched_ule not working with preemption),
but GENERIC had sched_ule by default -- including SMP.

While here, remove unused inclusion of <machine/clock.h>, remove
totally bogus inclusion of <i386/include/specialreg.h>.

14 years agothen -> than
Joerg Wunsch [Mon, 15 Mar 2010 16:06:52 +0000 (16:06 +0000)]
then -> than

MFC after: 1 day

14 years agoImplement "lookup dscp N" which does a lookup of the DSCP (top 6 bits
Luigi Rizzo [Mon, 15 Mar 2010 15:43:35 +0000 (15:43 +0000)]
Implement "lookup dscp N" which does a lookup of the DSCP (top 6 bits
of ip->ip_tos) in a table. This can be useful to direct traffic to
different pipes/queues according to the DSCP of the packet, as follows:

    ipfw add 100 queue tablearg lookup dscp 3 // table 3 maps dscp->queue

This change is a no-op (but harmless) until the two-line kernel
side is committed, which will happen shortly.

14 years agoMake the code more readable and compiling on 64-bits arch different
Attilio Rao [Mon, 15 Mar 2010 14:20:16 +0000 (14:20 +0000)]
Make the code more readable and compiling on 64-bits arch different
than amd64.

Sponsored by: Sandvine Incorporated
Submitted by: emaste
MFC: 2 weeks
X-MFC: r205160

14 years agoComment a fine point, so it does not get lost when people borrow code
Poul-Henning Kamp [Mon, 15 Mar 2010 08:58:35 +0000 (08:58 +0000)]
Comment a fine point, so it does not get lost when people borrow code
from FreeBSD for other purposes.

14 years agoFix two small bugs. The PowerPC 970 does not support non-coherent memory
Nathan Whitehorn [Mon, 15 Mar 2010 00:27:40 +0000 (00:27 +0000)]
Fix two small bugs. The PowerPC 970 does not support non-coherent memory
access, and reflects this by autonomously writing LPTE_M into PTE entries.
As such, we should not panic if LPTE_M changes by itself. While here,
fix a harmless typo in moea64_sync_icache().

14 years agoIt seems PCI_OUR_REG_[1-5] registers are not mapped on PCI
Pyun YongHyeon [Sun, 14 Mar 2010 23:23:57 +0000 (23:23 +0000)]
It seems PCI_OUR_REG_[1-5] registers are not mapped on PCI
configuration space on Yukon Ultra(88E8056) such that accesses to
these registers were NOPs which in turn make msk(4) instable on
this controller. Use indirect access method to access
PCI_OUR_REG_[1-5] registers. This should fix a long standing
instability bug which prevented msk(4) working on Yukon Ultra.
Special thanks to koitsu who gave me remote access to his system.

PR: kern/114631, kern/116853
MFC after: 1 week

14 years agoCheckin a facility for specifying a passthrough FIB from userland.
Attilio Rao [Sun, 14 Mar 2010 22:38:18 +0000 (22:38 +0000)]
Checkin a facility for specifying a passthrough FIB from userland.
arcconf tool by Adaptec already seems to use for identifying the
Serial Number of the devices.
Some simple things (like FIB setup and bound checks) are retrieved
from the Adaptec's driver, but this implementation is quite different
because it does use the normal buffer dmat area for loading segments
and not a special one (like the Adaptec's one does).

Sponsored by: Sandvine Incorporated
Discussed with: emaste, scottl
Reviewed by: emaste, scottl
MFC: 2 weeks

14 years agoGo ahead and add USB support to the generic config.
Warner Losh [Sun, 14 Mar 2010 19:04:42 +0000 (19:04 +0000)]
Go ahead and add USB support to the generic config.

14 years agoAbstract out initialization of most aspects of struct inpcbinfo from
Robert Watson [Sun, 14 Mar 2010 18:59:11 +0000 (18:59 +0000)]
Abstract out initialization of most aspects of struct inpcbinfo from
their calling contexts in {IP divert, raw IP sockets, TCP, UDP} and
create new helper functions: in_pcbinfo_init() and in_pcbinfo_destroy()
to do this work in a central spot.  As inpcbinfo becomes more complex
due to ongoing work to add connection groups, this will reduce code
duplication.

MFC after:      1 month
Reviewed by:    bz
Sponsored by:   Juniper Networks

14 years agoAdd extra Xrefs
Gavin Atkinson [Sun, 14 Mar 2010 15:49:04 +0000 (15:49 +0000)]
Add extra Xrefs

PR: docs/114184
Submitted by: Julian Stacey  <jhs berklix.org>
MFC after: 1 week

14 years agosh: Do not abort on a redirection error on a compound command.
Jilles Tjoelker [Sun, 14 Mar 2010 14:24:35 +0000 (14:24 +0000)]
sh: Do not abort on a redirection error on a compound command.

Redirection errors on subshells already did not abort the shell because
the redirection is executed in the subshell.

Other shells seem to agree that these redirection errors should not abort
the shell.

Also ensure that the redirections will be cleaned up properly in cases like
  command eval '{ shift x; } 2>/dev/null'

Example:
  { echo bad; } </var/empty/x; echo good

14 years agosh: Add test for redirection error on subshell (should not abort).
Jilles Tjoelker [Sun, 14 Mar 2010 13:51:12 +0000 (13:51 +0000)]
sh: Add test for redirection error on subshell (should not abort).

14 years agoRemove dot at the end of errx() message.
Konstantin Belousov [Sun, 14 Mar 2010 13:29:09 +0000 (13:29 +0000)]
Remove dot at the end of errx() message.

Noted by: bde
MFC after: 3 days

14 years agoAdjust style, fix typo, do not print errno because it is meaningless there.
Konstantin Belousov [Sun, 14 Mar 2010 13:05:48 +0000 (13:05 +0000)]
Adjust style, fix typo, do not print errno because it is meaningless there.
This test fails for now.

MFC after: 3 days

14 years agoMake it compile on LP64 arches.
Konstantin Belousov [Sun, 14 Mar 2010 13:04:09 +0000 (13:04 +0000)]
Make it compile on LP64 arches.

MFC after: 3 days

14 years agoCreate regression tests for ncal:
Edwin Groothuis [Sun, 14 Mar 2010 10:24:03 +0000 (10:24 +0000)]
Create regression tests for ncal:

- A couple of tests to check if the layout of the generated calenders
  is correct.

- A couple of tests to see if impossible combinations for -3, -A,
  -m, -y etc properly abort.

- A couple of test to confirm that the order of -A, -B, -3 etc give
  the right number of months.

14 years agoTrim down libcompat by removing <regexp.h>.
Ed Schouten [Sun, 14 Mar 2010 10:18:58 +0000 (10:18 +0000)]
Trim down libcompat by removing <regexp.h>.

Erwin ran an exp-run with libcompat and <regexp.h> removed. It turns out
the regexp library is almost entirely unused. In fact, it looks like it
is sometimes used by accident. Because these function names clash with
libc's <regex.h>, some application use both <regex.h> and libcompat,
which means they link against the wrong regex library.

This commit removes the regexp library and reimplements re_comp() and
re_exec() using <regex.h>. It seems the grammar of the regular
expressions accepted by these functions is similar to POSIX EREs.

After this commit, 1 low-profile port will be broken, but the maintainer
already has a patch for it sitting in his mailbox.

14 years agoMake it more clear in the docs that -a is not compatible with -iFU,
Doug Barton [Sun, 14 Mar 2010 05:22:46 +0000 (05:22 +0000)]
Make it more clear in the docs that -a is not compatible with -iFU,
and enforce this in the code. Apparently a lot of users mistakenly
combine -a with these flags and are then mystified that no changes
were made.

While I'm here, fix a trailing space in mergemaster.8

14 years agoenables S/W beacon miss handler.
Weongyo Jeong [Sun, 14 Mar 2010 02:13:11 +0000 (02:13 +0000)]
enables S/W beacon miss handler.

Reported by: imp

14 years agofixes a broken software beacon miss handler. There is a race to check
Weongyo Jeong [Sun, 14 Mar 2010 01:57:32 +0000 (01:57 +0000)]
fixes a broken software beacon miss handler.  There is a race to check
vap->iv_bmiss_count == 0 in ieee80211_swbmiss because iv_swbmiss_task is
enqueued by taskqueue.

Reviewed by: rpaulo

14 years agosh: Do not abort on a redirection error if there is no command word.
Jilles Tjoelker [Sat, 13 Mar 2010 22:53:17 +0000 (22:53 +0000)]
sh: Do not abort on a redirection error if there is no command word.

Although simple commands without a command word (only assignments and/or
redirections) are much like special builtins, POSIX and most shells seem to
agree that redirection errors should not abort the shell in this case. Of
course, the assignments persist and assignment errors are fatal.

To get the old behaviour portably, use the ':' special builtin.
To get the new behaviour portably, given that there are no assignments, use
the 'true' regular builtin.

14 years agoReadd $FreeBSD$ to the OpenSSL config file as that's useful for
Simon L. B. Nielsen [Sat, 13 Mar 2010 22:37:07 +0000 (22:37 +0000)]
Readd $FreeBSD$ to the OpenSSL config file as that's useful for
mergemaster.

Suggested by: dougb

14 years agosh: Add test for assignment errors (e.g. trying to change a readonly var).
Jilles Tjoelker [Sat, 13 Mar 2010 22:30:52 +0000 (22:30 +0000)]
sh: Add test for assignment errors (e.g. trying to change a readonly var).
We currently ignore readonly status for assignments before regular builtins
and external programs (these assignments are not persistent anyway), so just
check that the readonly variable really is not changed.
The test depends on the command builtin changes for 'command :'.

14 years agomake UMA the default allocator for ZFS buffers - this avoids
Kip Macy [Sat, 13 Mar 2010 21:53:48 +0000 (21:53 +0000)]
make UMA the default allocator for ZFS buffers - this avoids
a great deal of contention in kmem_alloc

MFC after: 7 days

14 years agofix compilation under ZIO_USE_UMA
Kip Macy [Sat, 13 Mar 2010 21:52:21 +0000 (21:52 +0000)]
fix compilation under ZIO_USE_UMA

14 years agoDon't bottleneck on acquiring the stream locks - this avoids a massive
Kip Macy [Sat, 13 Mar 2010 21:41:52 +0000 (21:41 +0000)]
Don't bottleneck on acquiring the stream locks - this avoids a massive
drop off in throughput with large numbers of simultaneous reads

MFC after: 7 days

14 years agosh: Fix longjmp clobber warnings in parser.c.
Jilles Tjoelker [Sat, 13 Mar 2010 20:43:11 +0000 (20:43 +0000)]
sh: Fix longjmp clobber warnings in parser.c.

Make parsebackq a function instead of an emulated nested function.
This puts the setjmp usage in a smaller function where it is easier to avoid
bad optimizations.

14 years agoRegenerate manual pages for OpenSSL 0.9.8m.
Simon L. B. Nielsen [Sat, 13 Mar 2010 19:30:29 +0000 (19:30 +0000)]
Regenerate manual pages for OpenSSL 0.9.8m.

MFC after: 3 weeks

14 years agoMerge OpenSSL 0.9.8m into head.
Simon L. B. Nielsen [Sat, 13 Mar 2010 19:22:41 +0000 (19:22 +0000)]
Merge OpenSSL 0.9.8m into head.

This also "reverts" some FreeBSD local changes so we should now
be back to using entirely stock OpenSSL.  The local changes were
simple $FreeBSD$ lines additions, which were required in the CVS
days, and the patch for FreeBSD-SA-09:15.ssl which has been
superseded with OpenSSL 0.9.8m's RFC5746 'TLS renegotiation
extension' support.

MFC after: 3 weeks

14 years agoFix build after typo.
Robert Noland [Sat, 13 Mar 2010 18:14:51 +0000 (18:14 +0000)]
Fix build after typo.

Reported by: Sergey V. Dyatko <sergey.dyatko@gmail.com>
MFC after: 3 days

14 years agoSmall style(9) cleanups.
Ed Schouten [Sat, 13 Mar 2010 18:06:17 +0000 (18:06 +0000)]
Small style(9) cleanups.

14 years agoCorrect a typo.
Joseph Koshy [Sat, 13 Mar 2010 15:10:07 +0000 (15:10 +0000)]
Correct a typo.

Submitted by: Rahul Saxena <rahul dot k dot saxena at gmail dot com>

14 years agoUse an unique directory name instead of hardcoded /tmp/.diskless.
Jaakko Heinonen [Sat, 13 Mar 2010 12:02:44 +0000 (12:02 +0000)]
Use an unique directory name instead of hardcoded /tmp/.diskless.
A malicious user could create a file named /tmp/.diskless and cause
the script to misbehave.

PR: conf/141258
Reported by: Jon Passki
MFC after: 1 week

14 years agoAdd support for Intel Pineview chips, aka IGD
Robert Noland [Sat, 13 Mar 2010 11:51:18 +0000 (11:51 +0000)]
Add support for Intel Pineview chips, aka IGD

Slightly modified version of the submitted patch.

PR: 143427
Submitted by: Mamoru Sumida <msumida@mvc.biglobe.ne.jp>
MFC after: 3 days

14 years agoChange the 'amt' parameter in format_k2 from int to unsigned long long
Rebecca Cran [Sat, 13 Mar 2010 11:17:39 +0000 (11:17 +0000)]
Change the 'amt' parameter in format_k2 from int to unsigned long long
to match the values passed in and prevent the SIZE field being corrupted
when more than 2TB is allocated.

PR: bin/129706
Approved by: rrs (mentor)
MFC after: 1 week

14 years agoFree the memory allocated via strdup.
Rebecca Cran [Sat, 13 Mar 2010 11:08:57 +0000 (11:08 +0000)]
Free the memory allocated via strdup.

PR: bin/113881
Submitted by: Alexander Drozdov  dzal_mail mtu-net.ru
Approved by: rrs (mentor)
MFC after: 1 week

14 years agoRemove COMPAT_43TTY from stock kernel configuration files.
Ed Schouten [Sat, 13 Mar 2010 09:21:00 +0000 (09:21 +0000)]
Remove COMPAT_43TTY from stock kernel configuration files.

COMPAT_43TTY enables the sgtty interface. Even though its exposure has
only been removed in FreeBSD 8.0, it wasn't used by anything in the base
system in FreeBSD 5.x (possibly even 4.x?). On those releases, if your
ports/packages are less than two years old, they will prefer termios
over sgtty.

14 years agoo) Use octeon_fpa_alloc_phys in a situation in which we don't need a usable
Juli Mallett [Sat, 13 Mar 2010 04:55:47 +0000 (04:55 +0000)]
o) Use octeon_fpa_alloc_phys in a situation in which we don't need a usable
   pointer, rather than octeon_fpa_alloc.
o) Report half duplex status properly.
o) Do not unconditionally update the last known link status in the softc.  If
   report_link isn't set, when octeon_rgmx_config_speed is called the first
   time it will tell the driver (essentially) that we have already marked the
   interface up.  Likewise, don't change media speed and duplex if only the
   link status is at issue. [1]
o) Remove manual changing of link state and let octeon_rgmx_config_speed do the
   heavy lifting. [1]

Reviewed by: [1] imp
Sponsored by: Packet Forensics

14 years agoMake this conform to the other top-level Makefile subdir listings with
Warner Losh [Sat, 13 Mar 2010 03:06:48 +0000 (03:06 +0000)]
Make this conform to the other top-level Makefile subdir listings with
one file per line.

Suggested by: bde

14 years agoFix spelling of noreorder.
Juli Mallett [Sat, 13 Mar 2010 02:10:20 +0000 (02:10 +0000)]
Fix spelling of noreorder.

14 years agoCorrect bugs fixed but not merged from my own tree.
Xin LI [Sat, 13 Mar 2010 00:15:06 +0000 (00:15 +0000)]
Correct bugs fixed but not merged from my own tree.

Pointy hat to: delphij
MFC after: 1 month

14 years agosh: Add tests for " and $ inside `.
Jilles Tjoelker [Fri, 12 Mar 2010 23:23:46 +0000 (23:23 +0000)]
sh: Add tests for " and $ inside `.

14 years agoThe proper fix for the delayed SCTP checksum is to
Randall Stewart [Fri, 12 Mar 2010 22:58:52 +0000 (22:58 +0000)]
The proper fix for the delayed SCTP checksum is to
have the delayed function take an argument as to the offset
to the SCTP header. This allows it to work for V4 and V6.
This of course means changing all callers of the function
to either pass the header len, if they have it, or create
it (ip_hl << 2 or sizeof(ip6_hdr)).
PR: 144529
MFC after: 2 weeks

14 years agofix type in comment
Bernd Walter [Fri, 12 Mar 2010 22:39:35 +0000 (22:39 +0000)]
fix type in comment

14 years agoAdd support of Intel Pineview chips, aka IGD.
Robert Noland [Fri, 12 Mar 2010 21:34:23 +0000 (21:34 +0000)]
Add support of Intel Pineview chips, aka IGD.

MFC after: 3 days

14 years agoFollow up commit to reindent the code.
Xin LI [Fri, 12 Mar 2010 21:15:35 +0000 (21:15 +0000)]
Follow up commit to reindent the code.

MFC after: 1 month

14 years agoTwo optimizations to MI strlen(3) inspired by David S. Miller's
Xin LI [Fri, 12 Mar 2010 21:14:56 +0000 (21:14 +0000)]
Two optimizations to MI strlen(3) inspired by David S. Miller's
blog posting [1].

 - Use word-sized test for unaligned pointer before working
   the hard way.

   Memory page boundary is always integral multiple of a word
   alignment boundary.  Therefore, if we can access memory
   referenced by pointer p, then (p & ~word mask) must be also
   accessible.

 - Better utilization of multi-issue processor's ability of
   concurrency.

   The previous implementation utilized a formular that must be
   executed sequentially.  However, the ~, & and - operations can
   actually be caculated at the same time when the operand were
   different and unrelated.

   The original Hacker's Delight formular also offered consistent
   performance regardless whether the input would contain
   characters with their highest-bit set, as it catches real
   nul characters only.

These two optimizations has shown further improvements over the
previous implementation on microbenchmarks on i386 and amd64 CPU
including Pentium 4, Core Duo 2 and i7.

[1] http://vger.kernel.org/~davem/cgi-bin/blog.cgi/2010/03/08#strlen_1

MFC after: 1 month

14 years agoflowtable_get_hashkey is only used by a DDB function - move under #ifdef DDB
Kip Macy [Fri, 12 Mar 2010 19:58:51 +0000 (19:58 +0000)]
flowtable_get_hashkey is only used by a DDB function - move under #ifdef DDB

pointed out by jkim@

14 years agoAdd pci ids for Intel Ironlake chipsets.
Robert Noland [Fri, 12 Mar 2010 19:43:39 +0000 (19:43 +0000)]
Add pci ids for Intel Ironlake chipsets.

These behave just like g45 for agp.

Tested by: Torfinn Ingolfsen

MFC after: 3 days

14 years agoFix a style(9) nit.
Jung-uk Kim [Fri, 12 Mar 2010 19:42:42 +0000 (19:42 +0000)]
Fix a style(9) nit.

14 years agore-update copyright to 2010
Kip Macy [Fri, 12 Mar 2010 19:26:45 +0000 (19:26 +0000)]
re-update copyright to 2010
pointed out by danfe@

14 years agoTidy up callout for select(2) and read timeout.
Jung-uk Kim [Fri, 12 Mar 2010 19:14:58 +0000 (19:14 +0000)]
Tidy up callout for select(2) and read timeout.

- Add a missing callout_drain(9) before the descriptor deallocation.[1]
- Prefer callout_init_mtx(9) over callout_init(9) and let the callout
subsystem handle the mutex for callout function.

PR: kern/144453
Submitted by: Alexander Sack (asack at niksun dot com)[1]
MFC after: 1 week

14 years agoImplement Rx checksum offloading for Yukon EC, Yukon Ultra,
Pyun YongHyeon [Fri, 12 Mar 2010 18:41:41 +0000 (18:41 +0000)]
Implement Rx checksum offloading for Yukon EC, Yukon Ultra,
Yukon FE and Yukon Ultra2. These controllers provide very simple
checksum computation mechanism and it requires additional pseudo
header checksum computation in upper stack. Even though I couldn't
see much performance difference with/without Rx checksum offloading
it may help notebook based controllers.

Actually controller can compute two checksum value by giving
different starting position of checksum computation on received
frame. However, for long time, Marvell's checksum offloading engine
have been known to have several silicon bugs so don't blindly trust
computed partial checksum value. Instead, compute partial checksum
twice by giving the same checksum computation position and compare
the result. If the value is different it's clear indication of
hardware bug. This configuration lose IP checksum offloading
capability but I think it's better to take safe route.
Note, Rx checksum offloading for Yukon XL was still disabled due to
known silicon bug.

14 years agoReorder interrupt handler a bit such that producer/consumer
Pyun YongHyeon [Fri, 12 Mar 2010 18:18:04 +0000 (18:18 +0000)]
Reorder interrupt handler a bit such that producer/consumer
index of status block is read first before acknowledging the
interrupts. Otherwise bge(4) may get stale status block as
acknowledging an interrupt may yield another status block update.

Reviewed by: marius

14 years agoUpdate to upstream version 2.3
Tony Finch [Fri, 12 Mar 2010 17:55:29 +0000 (17:55 +0000)]
Update to upstream version 2.3

Add -V (display version) and -S (list controlling symbols per #if
with nesting information) options, and improve unifdefall debug output.
Done committing 0 revisions to SVN

Obtained from: http://dotat.at/prog/unifdef

14 years agoNow fix functionality of 'netstat -f netgraph' that hasn't worked
Gleb Smirnoff [Fri, 12 Mar 2010 15:04:59 +0000 (15:04 +0000)]
Now fix functionality of 'netstat -f netgraph' that hasn't worked
starting from netgraph import in 1999.

netstat(8) used pointer to node as node address, oops. That didn't
work, we need the node ID in brackets to successfully address a node.
We can't look into ng_node, due to inability to include netgraph/netgraph.h
in userland code. So let the node make a hint for a userland, storing
the node ID in its private data.

MFC after: 2 weeks

14 years agoFix 'netstat -f netgraph', which I had broken in r163463 ling time
Gleb Smirnoff [Fri, 12 Mar 2010 14:51:42 +0000 (14:51 +0000)]
Fix 'netstat -f netgraph', which I had broken in r163463 ling time
ago in 2006. This linked list is actually needed for userland.

PR: kern/140446
Submitted by: Adrian Steinmann <ast marabu.ch>

14 years agoForce commit to correct Bug ID:
Pawel Jakub Dawidek [Fri, 12 Mar 2010 13:36:58 +0000 (13:36 +0000)]
Force commit to correct Bug ID:

Obtained from: OpenSolaris, Bug ID 6920880

14 years agoRemove bogus assertion.
Pawel Jakub Dawidek [Fri, 12 Mar 2010 12:07:21 +0000 (12:07 +0000)]
Remove bogus assertion.

Reported by: Johan Ström <johan@stromnet.se>
Obtained from: OpenSolaris, Bug ID 6827260
MFC after: 1 week

14 years agoFix typo in macro name and macro usage.
Ulrich Spörlein [Fri, 12 Mar 2010 11:05:37 +0000 (11:05 +0000)]
Fix typo in macro name and macro usage.

Found by: make manlint
Reviewed by: ru
Approved by: harti, philip (mentor)

14 years agoThe flow-table module retrieves the destination and source
Qing Li [Fri, 12 Mar 2010 10:24:58 +0000 (10:24 +0000)]
The flow-table module retrieves the destination and source
address as well as the transport protocol port information
from the outbound packets. The routing code is generic and
compares every byte in the given sockaddr object. Therefore
the temporary sockaddr objects must be cleared due to padding
bytes. In addition, the port information must be stripped
or the route search will either fail or return the incorrect
route entry.

Unit testing is done using OpenVPN over the if_tun interface.

MFC after: 7 days

14 years agoFix several typos in macros or macro misusage.
Ulrich Spörlein [Fri, 12 Mar 2010 10:01:06 +0000 (10:01 +0000)]
Fix several typos in macros or macro misusage.

Found by: make manlint
Reviewed by: ru
Approved by: philip (mentor)

14 years agoWith the recent change of the sctp checksum to support offload,
Randall Stewart [Fri, 12 Mar 2010 08:10:30 +0000 (08:10 +0000)]
With the recent change of the sctp checksum  to support offload,
no delayed checksum was added to the ip6 output code. This
causes cards that do not support SCTP checksum offload to
have SCTP packets that are IPv6 NOT have the sctp checksum
performed. Thus you could not communicate with a peer. This
adds the missing bits to make the checksum happen for these cards.

PR: 144529
MFC after: 2 weeks

14 years agoMask disk_idx to avoid panic because of extra bits set.
Alexander Motin [Fri, 12 Mar 2010 07:49:10 +0000 (07:49 +0000)]
Mask disk_idx to avoid panic because of extra bits set.

PR: kern/102211
Submitted by: yoichi

14 years agoRegen:
Brooks Davis [Fri, 12 Mar 2010 07:26:37 +0000 (07:26 +0000)]
Regen:

* Hart: rev 671 of pcidevs.txt; 22-01-2008 (D-M-Y).
* Boemler: vendors.txt (2010-03126)

PR: kern/133733
MFC after: 1 week

14 years ago- Enable kernel stack guard page.
Neel Natu [Fri, 12 Mar 2010 07:08:20 +0000 (07:08 +0000)]
- Enable kernel stack guard page.

- Unmap the unused kernel stack page that we cannot use because it is
  not aligned on a (PAGE_SIZE * 2) boundary.

14 years ago- With the introduction of -A, -B and -3, not all combinations of
Edwin Groothuis [Fri, 12 Mar 2010 06:57:53 +0000 (06:57 +0000)]
- With the introduction of -A, -B and -3, not all combinations of
  arguments makes sense anymore. For example, what would a combination
  of -3 (show three months) and -y (show the whole year) do?
  We will abort on these cases.
- Move the debug option -d to -H (from highlight), while -d is now
  used for setting the day of "today" so that -y and friends can
  be tested.

14 years agofix stats reporting sysctl
Kip Macy [Fri, 12 Mar 2010 06:31:19 +0000 (06:31 +0000)]
fix stats reporting sysctl

14 years ago- restructure flowtable to support ipv6
Kip Macy [Fri, 12 Mar 2010 05:03:26 +0000 (05:03 +0000)]
- restructure flowtable to support ipv6
- add a name argument to flowtable_alloc for printing with ddb commands
- extend ddb commands to print destination address or 4-tuples
- don't parse ports in ulp header if FL_HASH_ALL is not passed
- add kern_flowtable_insert to enable more generic use of flowtable
  (e.g. system calls for adding entries)
- don't hash loopback addresses
- cleanup whitespace
- keep statistics per-cpu for per-cpu flowtables to avoid cache line contention
- add sysctls to accumulate stats and report aggregate

MFC after: 7 days

14 years agoMake the ddb command "show tlb" SMP friendly.
Neel Natu [Fri, 12 Mar 2010 03:49:17 +0000 (03:49 +0000)]
Make the ddb command "show tlb" SMP friendly.

It now accepts an argument to dump out the tlb of a particular cpu.

14 years agoFix the previous attempt to fix kernel builds of HEAD on 7.x. Use the
John Baldwin [Fri, 12 Mar 2010 03:08:47 +0000 (03:08 +0000)]
Fix the previous attempt to fix kernel builds of HEAD on 7.x.  Use the
__gnu_inline__ attribute for PMAP_INLINE when using the 7.x compiler to
match what 7.x uses for PMAP_INLINE.

14 years agoo) Send packets being queued for transmission up to BPF if there's a listener.
Juli Mallett [Fri, 12 Mar 2010 02:56:45 +0000 (02:56 +0000)]
o) Send packets being queued for transmission up to BPF if there's a listener.
o) Properly configure the CAM to handle IFF_PROMISC and note where IFF_ALLMULTI
   handling would go if we didn't already force the NIC to receive all
   multicast traffic.

Reviewed by: imp
Sponsored by: Packet Forensics

14 years agoimplement listing of a subset of pipes/queues/schedulers.
Luigi Rizzo [Thu, 11 Mar 2010 22:42:33 +0000 (22:42 +0000)]
implement listing of a subset of pipes/queues/schedulers.
The filtering of the output is done in the kernel instead of userland
to reduce the amount of data transfered.

14 years agoAdd bpf and random to Octeon configurations, since they're needed to run
Juli Mallett [Thu, 11 Mar 2010 22:29:45 +0000 (22:29 +0000)]
Add bpf and random to Octeon configurations, since they're needed to run
dhclient and ssh respectively.

Reviewed by: imp

14 years agoDon't force single user on Octeon anymore.
Juli Mallett [Thu, 11 Mar 2010 22:25:53 +0000 (22:25 +0000)]
Don't force single user on Octeon anymore.

14 years agoo) Eliminate use of sc->typestr, which is always NULL.
Juli Mallett [Thu, 11 Mar 2010 22:22:06 +0000 (22:22 +0000)]
o) Eliminate use of sc->typestr, which is always NULL.
o) Inline octeon_rgmx_mark_ready into octeon_rgmx_init.
o) Add a media status handler that reports link and media status.
o) Set link state when if_init is called.
o) Remove some printfs related to driver state changes.
o) Remove some gratuitous comments.

Reviewed by: imp
Sponsored by: Packet Forensics

14 years agoAdd device ID for the NATURAL4000 keyboard
Andrew Thompson [Thu, 11 Mar 2010 22:09:21 +0000 (22:09 +0000)]
Add device ID for the NATURAL4000 keyboard

14 years ago- Integrate latest driver code from OpenBSD
Andrew Thompson [Thu, 11 Mar 2010 22:05:12 +0000 (22:05 +0000)]
- Integrate latest driver code from OpenBSD
- Drain our tasks from the ieee80211 taskqueue
- Add more IDs

Submitted by: Akinori Furukoshi

14 years agoextend search for Apple Function Key.
Andrew Thompson [Thu, 11 Mar 2010 21:57:01 +0000 (21:57 +0000)]
extend search for Apple Function Key.

PR: usb/144414
Submitted by: Hans Petter Selasky

14 years agoAdd new device ID for the SMC 2514HUB
Andrew Thompson [Thu, 11 Mar 2010 21:55:25 +0000 (21:55 +0000)]
Add new device ID for the SMC 2514HUB

Submitted by: Alexander Best

14 years agoadd new vendor ID for APACER
Andrew Thompson [Thu, 11 Mar 2010 21:54:23 +0000 (21:54 +0000)]
add new vendor ID for APACER

Submitted by: Paul B Mahol

14 years agoImplement USB kernel driver detach from userland.
Andrew Thompson [Thu, 11 Mar 2010 21:50:36 +0000 (21:50 +0000)]
Implement USB kernel driver detach from userland.

Submitted by: Hans Petter Selasky

14 years agoMake sure there is a way to reset the endpoint FIFO on transfer errors for
Andrew Thompson [Thu, 11 Mar 2010 21:49:43 +0000 (21:49 +0000)]
Make sure there is a way to reset the endpoint FIFO on transfer errors for
ISOCHRONOUS transfers

Submitted by: Hans Petter Selasky

14 years agoFor USS820 driver we need to manually reset TX FIFO at each SETUP transaction
Andrew Thompson [Thu, 11 Mar 2010 21:49:00 +0000 (21:49 +0000)]
For USS820 driver we need to manually reset TX FIFO at each SETUP transaction
because the chip doesn't do this by itself.

Submitted by: Hans Petter Selasky

14 years agoisochronous endpoint descriptors should have two more bytes which are zero by
Andrew Thompson [Thu, 11 Mar 2010 21:48:10 +0000 (21:48 +0000)]
isochronous endpoint descriptors should have two more bytes which are zero by
default.

Submitted by: Hans Petter Selasky

14 years agoAdd new uvisor(4) device ID.
Andrew Thompson [Thu, 11 Mar 2010 21:47:25 +0000 (21:47 +0000)]
Add new uvisor(4) device ID.

PR: usb/144201

14 years agoIt appears that some UVISOR devices do not handle when the clear stall command
Andrew Thompson [Thu, 11 Mar 2010 21:46:33 +0000 (21:46 +0000)]
It appears that some UVISOR devices do not handle when the clear stall command
is issued at the beginning of the initial IN/OUT data transfers.  Reason
unknown, probably firmware fault. Now the stall is only cleared on data
transfer errors.

PR: usb/144199
Submitted by: Hans Petter Selasky

14 years ago- make the usb_temp_setup() and usb_temp_unsetup() functions public so that
Andrew Thompson [Thu, 11 Mar 2010 21:45:31 +0000 (21:45 +0000)]
- make the usb_temp_setup() and usb_temp_unsetup() functions public so that
  other modules can generate USB descriptors.
- extend the vendor specific request function by one length pointer argument,
  because not all descriptors store the length in the first byte. For example
  HID descriptors.

Submitted by: Hans Petter Selasky

14 years agoUse wMaxPacketSize for the uftdi input buffer size.
Andrew Thompson [Thu, 11 Mar 2010 21:42:09 +0000 (21:42 +0000)]
Use wMaxPacketSize for the uftdi input buffer size.

Submitted by: Hans Petter Selasky

14 years agoFix ARM cache handling yet more.
Rafal Jaworowski [Thu, 11 Mar 2010 21:16:54 +0000 (21:16 +0000)]
Fix ARM cache handling yet more.

1) vm_machdep.c: remove the dangling allocations so they do not
   un-necessarily turn off the cache upon consecutive access.

2) busdma_machdep.c: remove the same amount than shadow mapped.

Reported by: Maks Verver
Submitted by: Mark Tinguely
Reviewed by: Grzegorz Bernacki
MFC after: 3 days

14 years agoLet detailed info about CPU features print on Marvell Sheeva CPU as well.
Rafal Jaworowski [Thu, 11 Mar 2010 21:04:29 +0000 (21:04 +0000)]
Let detailed info about CPU features print on Marvell Sheeva CPU as well.

Provide missing entry in the cpu_classes[].

Reported by: Maks Verver
MFC after: 1 week