]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoUpdate to 9.6.2-P1, the latest patchfix release which deals with
Doug Barton [Thu, 18 Mar 2010 19:00:35 +0000 (19:00 +0000)]
Update to 9.6.2-P1, the latest patchfix release which deals with
the problems related to the handling of broken DNSSEC trust chains.

This fix is only relevant for those who have DNSSEC validation
enabled and configure trust anchors from third parties, either
manually, or through a system like DLV.

14 years agoFor those of us mere mortals who do not aspire to the lofty heights
Doug Barton [Thu, 18 Mar 2010 18:58:17 +0000 (18:58 +0000)]
For those of us mere mortals who do not aspire to the lofty heights
of kernel hackery, add MAKE_JUST_WORLDS so that we can take part in
the 'make universe' goodnes without using unecessary time and resources.

14 years agoUnbreak build by removing a code bit that is only related to other code
Rui Paulo [Thu, 18 Mar 2010 15:28:17 +0000 (15:28 +0000)]
Unbreak build by removing a code bit that is only related to other code
in my branch.

14 years agoAdd support for retrieving labeled pf filter rule counters.
Shteryana Shopova [Thu, 18 Mar 2010 14:54:31 +0000 (14:54 +0000)]
Add support for retrieving labeled pf filter rule counters.

PR: bin/132847
Submitted by: Szalai Andras <szalai (dot) bandi (at) gmail.com>

14 years agoSimplify loops.
Pawel Jakub Dawidek [Thu, 18 Mar 2010 13:11:43 +0000 (13:11 +0000)]
Simplify loops.

14 years agoFix a couple of bugs with 802.11n:
Rui Paulo [Thu, 18 Mar 2010 11:06:38 +0000 (11:06 +0000)]
Fix a couple of bugs with 802.11n:
o Process the BAR frame on the adhoc, mesh and sta modes
o Fix the format of the ADDBA reply frame
o Fix references to the spec section numbers

Also, print the all the MCS rates in bootverbose.

Sponsored by: iXsystems, Inc.
Obtained from: //depot/user/rpaulo/80211n/...

14 years agoAdd ddb support to the "new" link layer code ("new-arp"):
Bjoern A. Zeeb [Thu, 18 Mar 2010 09:09:59 +0000 (09:09 +0000)]
Add ddb support to the "new" link layer code ("new-arp"):
 - show all lltables [1] (optional flag to also show the llentries as well)
 - show lltable <struct lltable *>
 - show llentry <struct llentry *>

MFC after: 6 days

14 years agoRemove an unneeded variable.
Ed Schouten [Thu, 18 Mar 2010 07:35:20 +0000 (07:35 +0000)]
Remove an unneeded variable.

Reported by: tinderbox

14 years agoRemove two pieces of code (one disabled in revision 39665 and another derived
Xin LI [Thu, 18 Mar 2010 00:27:17 +0000 (00:27 +0000)]
Remove two pieces of code (one disabled in revision 39665 and another derived
from the first one) that is not used for the last 12 years.

14 years agoNeed to set the proper flag bit when inserting ARP
Qing Li [Thu, 18 Mar 2010 00:23:39 +0000 (00:23 +0000)]
Need to set the proper flag bit when inserting ARP
entries into the kernel.

MFC after: 3 days

14 years agoo) Add a keyword to displaying elapsed time in integer seconds, "etimes".
Juli Mallett [Wed, 17 Mar 2010 22:57:58 +0000 (22:57 +0000)]
o) Add a keyword to displaying elapsed time in integer seconds, "etimes".
o) Give slightly better (i.e. any) documentation of the format of "etime".

Reviewed by: jilles

14 years agoRemove two instances of the evil hack to get the ifnet. mii_ifp is
Warner Losh [Wed, 17 Mar 2010 22:45:53 +0000 (22:45 +0000)]
Remove two instances of the evil hack to get the ifnet.  mii_ifp is
set early enough that we don't need to do these hacks anymore.

14 years agoo Add support for UltraSparc-IV+:
Marius Strobl [Wed, 17 Mar 2010 22:45:09 +0000 (22:45 +0000)]
o Add support for UltraSparc-IV+:
  - Swap the configuration of the first and second large dTLB as with
    US-IV+ these can only hold entries of certain page sizes each, which
    we happened to chose the non-working way around.
  - Additionally ensure that the large iTLB is set up to hold 8k pages
    (currently this happens to be a NOP though).
  - Add a workaround for US-IV+ erratum #2.
  - Turn off dTLB parity error reporting as otherwise we get seemingly
    false positives when copying in the user window by simulating a
    fill trap on return to usermode. Given that these parity errors can
    be avoided by disabling multi issue mode and the problem could be
    reproduced with a second machine this appears to be a silicon bug of
    some sort.
  - Add a membar #Sync also before the stores to ASI_DCACHE_TAG. While
    at it, turn of interrupts across the whole cheetah_cache_flush() for
    simplicity instead of around every flush. This should have next to no
    impact as for cheetah-class machines we typically only need to flush
    the caches a few times during boot when recovering from peeking/poking
    non-existent PCI devices, if at all.
  - Just use KERNBASE for FLUSH as we also do elsewhere as the US-IV+
    documentation doesn't seem to mention that these CPUs also ignore the
    address like previous cheetah-class CPUs do. Again the code changing
    LSU_IC is executed seldom enough that the negligible optimization of
    using %g0 instead should have no real impact.

  With these changes FreeBSD runs stable on V890 equipped with US-IV+
  and -j128 buildworlds in a loop for days are no problem. Unfortunately,
  the performance isn't were it should be as a buildworld on a 4x1.5GHz
  US-IV+ V890 takes nearly 3h while on a V440 with (theoretically) less
  powerfull 4x1.5GHz US-IIIi it takes just over 1h. It's unclear whether
  this is related to the supposed silicon bug mentioned above or due to
  another issue. The documentation (which contains a sever bug in the
  description of the bits added to the context registers though) at least
  doesn't mention any requirements for changes in the CPU handling besides
  those implemented and the cache as well as the TLB configurations and
  handling look fine.
o Re-arrange cheetah_init() so it's easier to add support for SPARC64
  V up to VIIIfx CPUs, which only require parts of this initialization.

14 years agoSet the device capabilities to include dynamic link-state for
Qing Li [Wed, 17 Mar 2010 22:12:12 +0000 (22:12 +0000)]
Set the device capabilities to include dynamic link-state for
those modern drivers.

Reviewed by: imp (and suggested by imp)
MFC after: 3 days

14 years agoCache line align various structures and move volatile counters to
Kip Macy [Wed, 17 Mar 2010 21:18:28 +0000 (21:18 +0000)]
Cache line align various structures and move volatile counters to
not share a cache line with (mostly) immutable state

Reviewed by: jeff@
MFC after: 7 days

14 years ago- cache line align arcs_lock array (h/t Marius Nuennerich)
Kip Macy [Wed, 17 Mar 2010 21:10:09 +0000 (21:10 +0000)]
- cache line align arcs_lock array (h/t Marius Nuennerich)
- fix ARCS_LOCK_PAD to use architecture defined CACHE_LINE_SIZE
- cache line align buf_hash_table ht_locks array

MFC after: 7 days

14 years agoAdd macros for the VER.impl of SPARC64 II to VIIIfx.
Marius Strobl [Wed, 17 Mar 2010 21:00:39 +0000 (21:00 +0000)]
Add macros for the VER.impl of SPARC64 II to VIIIfx.

14 years ago- Add TTE and context register bits for the additional page sizes supported
Marius Strobl [Wed, 17 Mar 2010 20:23:14 +0000 (20:23 +0000)]
- Add TTE and context register bits for the additional page sizes supported
  by UltraSparc-IV and -IV+ as well as SPARC64 V, VI, VII and VIIIfx CPUs.
- Replace TLB_PCXR_PGSZ_MASK and TLB_SCXR_PGSZ_MASK with TLB_CXR_PGSZ_MASK
  which just is the complement of TLB_CXR_CTX_MASK instead of trying to
  assemble it from the page size bits which vary across CPUs.
- Add macros for the remainder of the SFSR bits, which are useful for at
  least debugging purposes.

14 years agoFix 2 bugs in mxge_attach()
Andrew Gallatin [Wed, 17 Mar 2010 20:13:09 +0000 (20:13 +0000)]
Fix 2 bugs in mxge_attach()

- Don't leak slice resources when mxge_alloc_rings() fails

- Start taskq threads only after we know attach will succeed.  At
  boot time, taskqueue_terminate() will loop infinately, waiting
  for the threads to exit, and hang the system.

Submitted by: Panasas
MFC After: 3 days

14 years ago- Add quirk handling for Sun Fire V1280. The firmware of these machines
Marius Strobl [Wed, 17 Mar 2010 20:01:01 +0000 (20:01 +0000)]
- Add quirk handling for Sun Fire V1280. The firmware of these machines
  provides no ino-bitmap properties so forge them using the default set
  of controller interrupts and let schizo_setup_intr() take care of the
  children, hoping for non-fancy routing.
- Add quirk handling for Sun Fire V890. When booting these machines from
  disk a Schizo comes up with PCI error residing which triggers as soon
  as we register schizo_pci_bus() even when clearing it from all involved
  registers (it's no longer indicated once we're in schizo_pci_bus()
  though). Thus make PCI bus errors non-fatal until we actually touch the
  bus. With this change schizo_pci_bus() typically triggers once during
  attach in this case. Obviously this approach isn't exactly race free
  but it's about the best we can do about this problem as we're not
  guaranteed that the interrupt will actually trigger on V890 either, as
  it certainly doesn't when for example netbooting them.

14 years agouse CACHE_LINE_SIZE instead of hardcoding 128 for lock pad
Kip Macy [Wed, 17 Mar 2010 20:00:22 +0000 (20:00 +0000)]
use CACHE_LINE_SIZE instead of hardcoding 128 for lock pad

pointed out by Marius Nuennerich and jhb@

14 years agoWe actually can generate a host number.
Matt Jacob [Wed, 17 Mar 2010 18:53:58 +0000 (18:53 +0000)]
We actually can generate a host number.

MFC after: 1 month

14 years agoAdd pcb reference counting to the pcblist sysctl handler functions
Bjoern A. Zeeb [Wed, 17 Mar 2010 18:28:27 +0000 (18:28 +0000)]
Add pcb reference counting to the pcblist sysctl handler functions
to ensure type stability while caching the pcb pointers for the
copyout.

Reviewed by: rwatson
MFC after: 7 days

14 years agoAdd "Massachusetts".
David E. O'Brien [Wed, 17 Mar 2010 15:31:06 +0000 (15:31 +0000)]
Add "Massachusetts".

14 years agoVendor import of BIND 9.6.2-P1
Doug Barton [Wed, 17 Mar 2010 05:53:04 +0000 (05:53 +0000)]
Vendor import of BIND 9.6.2-P1

14 years agoPut gone device timer into a structure tag that can hold more than 32 seconds. Oops.
Matt Jacob [Wed, 17 Mar 2010 02:48:14 +0000 (02:48 +0000)]
Put gone device timer into a structure tag that can hold more than 32 seconds. Oops.

Untangle some of the confusion about what role means when it's in the FCPARAM/SDPARAM
or isp_fc/isp_spi structures. This fixed a problem about seeing targets appear if you've
turned off autologin and find them, or rather don't, via camcontrol rescan.

MFC after: 1 month

14 years agoRevamp the interrupt code based on the previous commit:
Marcel Moolenaar [Wed, 17 Mar 2010 00:37:15 +0000 (00:37 +0000)]
Revamp the interrupt code based on the previous commit:
o   Introduce XIV, eXternal Interrupt Vector, to differentiate from
    the interrupts vectors that are offsets in the IVT (Interrupt
    Vector Table). There's a vector for external interrupts, which
    are based on the XIVs.

o   Keep track of allocated and reserved XIVs so that we can assign
    XIVs without hardcoding anything. When XIVs are allocated, an
    interrupt handler and a class is specified for the XIV. Classes
    are:
    1.  architecture-defined: XIV 15 is returned when no external
interrupt are pending,
    2.  platform-defined: SAL reports which XIV is used to wakeup
an AP (typically 0xFF, but it's 0x12 for the Altix 350).
    3.  inter-processor interrupts: allocated for SMP support and
non-redirectable.
    4.  device interrupts (i.e. IRQs): allocated when devices are
discovered and are redirectable.

o   Rewrite the central interrupt handler to call the per-XIV
    interrupt handler and rename it to ia64_handle_intr(). Move
    the per-XIV handler implementation to the file where we have
    the XIV allocation/reservation. Clock interrupt handling is
    moved to clock.c. IPI handling is moved to mp_machdep.c.

o   Drop support for the Intel 8259A because it was broken. When
    XIV 0 is received, the CPU should initiate an INTA cycle to
    obtain the interrupt vector of the 8259-based interrupt. In
    these cases the interrupt controller we should be talking to
    WRT to masking on signalling EOI is the 8259 and not the I/O
    SAPIC. This requires adriver for the Intel 8259A which isn't
    available for ia64. Thus stop pretending to support ExtINTs
    and instead panic() so that if we come across hardware that
    has an Intel 8259A, so have something real to work with.

o   With XIVs for IPIs dynamically allocatedi and also based on
    priority, define the IPI_* symbols as variables rather than
    constants. The variable holds the XIV allocated for the IPI.

o   IPI_STOP_HARD delivers a NMI if possible. Otherwise the XIV
    assigned to IPI_STOP is delivered.

14 years agoBetter way to find out available file system types is to use lsvfs(1).
Pawel Jakub Dawidek [Tue, 16 Mar 2010 23:19:55 +0000 (23:19 +0000)]
Better way to find out available file system types is to use lsvfs(1).
Using 'sysctl vfs' is not only ugly, but is also not reliable - not all
file system types create entries in vfs sysctl tree.

Reviewed by: imp
MFC after: 1 week

14 years ago- reduce contention by breaking up ARC state locks in to 16 for data
Kip Macy [Tue, 16 Mar 2010 22:17:21 +0000 (22:17 +0000)]
- reduce contention by breaking up ARC state locks in to 16 for data
  and 16 for metadata
- export L2ARC tunables as sysctls
- add several kstats to track L2ARC state more precisely
- avoid holding a contended lock when atomically incrementing a
  contended counter (no lock protection needed for atomics)

14 years agoAdd missing headers. While there, arrange headers alphabetically.
Konstantin Belousov [Tue, 16 Mar 2010 20:42:54 +0000 (20:42 +0000)]
Add missing headers. While there, arrange headers alphabetically.

MFC after: 3 days

14 years agoAdd missing headers.
Konstantin Belousov [Tue, 16 Mar 2010 20:41:45 +0000 (20:41 +0000)]
Add missing headers.

MFC after: 3 days

14 years agoFix a long standing regression of readdir(3) in fdescfs(5) introduced
Jung-uk Kim [Tue, 16 Mar 2010 19:59:14 +0000 (19:59 +0000)]
Fix a long standing regression of readdir(3) in fdescfs(5) introduced
in r1.48.  We were stopping at the first null pointer when multiple file
descriptors were opened and one in the middle was closed.  This restores
traditional behaviour of fdescfs.

MFC after: 3 days

14 years agoVerify interface up status using its link state only
Qing Li [Tue, 16 Mar 2010 17:59:12 +0000 (17:59 +0000)]
Verify interface up status using its link state only
if the interface has such capability. The interface
capability flag indicates whether such capability
exists. This approach is much more backward compatible.
Physical device driver changes will be part of another
commit.

Also updated the ifconfig utility to show the LINKSTATE
capability if present.

Reviewed by: rwatson, imp, juli
MFC after: 3 days

14 years agoRevert r205090.
Pyun YongHyeon [Tue, 16 Mar 2010 17:45:16 +0000 (17:45 +0000)]
Revert r205090.
It's hard to know when the mail box register write will get flushed to
the hardware and it may take longer.

Pointed out by: scottl

14 years ago- Extend the machine check record structure to include several fields useful
John Baldwin [Tue, 16 Mar 2010 16:01:19 +0000 (16:01 +0000)]
- Extend the machine check record structure to include several fields useful
  for parsing model-specific and other fields in machine check events
  including the global machine check capabilities and status registers,
  CPU identification, and the FreeBSD CPU ID.
- Report these added fields in the console log of a machine check so that
  a record structure can be reconstituted from the console messages.
- Parse new architectural errors including memory controller errors.

MFC after: 1 week

14 years agoUse unsigned long long constants for fields in 64-bit machine check
John Baldwin [Tue, 16 Mar 2010 15:27:58 +0000 (15:27 +0000)]
Use unsigned long long constants for fields in 64-bit machine check
registers instead of unsigned long constants.

MFC after: 3 days

14 years ago- Use `Va' for variables instead of `Dv'.
Ulrich Spörlein [Tue, 16 Mar 2010 11:38:07 +0000 (11:38 +0000)]
- Use `Va' for variables instead of `Dv'.
- Correctly spell negative values.
- Also fixes make manlint.

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

14 years agoMerge OpenSolaris revision 9396:f41cf682d0d3:
Xin LI [Tue, 16 Mar 2010 00:50:57 +0000 (00:50 +0000)]
Merge OpenSolaris revision 9396:f41cf682d0d3:

6830813 zfs list -t all fails assertion

*Note that this is only a partial merge of this revision addressing only
this one issue.*

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

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.