]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
12 years agoMFC r221251:
tuexen [Fri, 10 Feb 2012 20:29:55 +0000 (20:29 +0000)]
MFC r221251:
Remove some leftover debug code.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231427 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r221249:
tuexen [Fri, 10 Feb 2012 20:27:58 +0000 (20:27 +0000)]
MFC r221249:
Improve compilation of SCTP code without INET support.
Some bugs where fixed while doing this:
* ASCONF-ACK messages might use wrong port number when using
  IPv6.
* Checking for additional addresses takes the correct address
  into account and also does not do more comparisons than
  necessary.

This patch is based on one received from bz@ who was
sponsored by The FreeBSD Foundation and iXsystems.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231426 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r219397:
tuexen [Fri, 10 Feb 2012 20:22:45 +0000 (20:22 +0000)]
MFC r219397:
Tunes and fixes the new DC-CC to seem to hit the
right mix.  Still may need some tweaks but it
appears to almost not give away too much to an
RFC2581 flow, but can really minimize the amount of
buffers used in the net.
From rrs@.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231425 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r219120:
tuexen [Fri, 10 Feb 2012 20:19:38 +0000 (20:19 +0000)]
MFC r219120:
Adds a new Congestion Control that helps reduce
the RTT that a flow will build up in buffers in
transit. It is a slight modification to RFC2581
but is more friendly i.e. less aggressive.
From rrs@.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231424 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r219057:
tuexen [Fri, 10 Feb 2012 20:17:28 +0000 (20:17 +0000)]
MFC r219057:
Improvements to CC modules:
1) Add four new points that allow you to get more information
   to cc algo's
2) Fix the case where user changes module on a existing TCB, in
   such a case, the initialization module needs to be called on all nets.
3) Move htcp_cc structure to a union that other modules can use.
4) Add 5th point for get/set socket options for cc_module specific options
From rrs@.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231423 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r219014:
tuexen [Fri, 10 Feb 2012 20:09:23 +0000 (20:09 +0000)]
MFC r219014:
* Fix several bugs where the scaled versions of srtt and rttvar
  where used incorrectly.
* Use appropriate variable names for RTO instead of RTT.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231422 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r219013:
tuexen [Fri, 10 Feb 2012 20:07:01 +0000 (20:07 +0000)]
MFC r219013:
* Cleanup the code computing the retransmission timeout.
* Fix an initialization bug for the scaled variance of the RTO.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231421 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r218818:
tuexen [Fri, 10 Feb 2012 20:00:21 +0000 (20:00 +0000)]
MFC r218818:
Bugfix: Get per vnet sysctl variables and statistics working.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231420 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r218641:
tuexen [Fri, 10 Feb 2012 19:57:58 +0000 (19:57 +0000)]
MFC r218641:
Fix a bug reported by Jonathan Leighton in his web-sctp testing
at the Univ-of-Del. Basically when a 1-to-1 socket did a
socket/bind/send(data)/close. If the timing was right
we would dereference a socket that is NULL.
From rrs@.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231418 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r218639:
tuexen [Fri, 10 Feb 2012 19:56:02 +0000 (19:56 +0000)]
MFC r218639:
Fix several bugs related to stream scheduling.

Obtained from: Robin Seggelmann

git-svn-id: svn://svn.freebsd.org/base/stable/8@231417 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r218521:
tuexen [Fri, 10 Feb 2012 19:54:18 +0000 (19:54 +0000)]
MFC r218521:
Remove addresses from endpoint when there are no associations.
This fixes a bug reported by brucec@.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231416 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r218400:
tuexen [Fri, 10 Feb 2012 19:52:18 +0000 (19:52 +0000)]
MFC r218400:
Fix bugs related to M_FLOWID:
* Store the flowid when receiving an SCTP/IPv6 packet.
* Store the flowid when receiving an SCTP packet with wrong CRC.
* Initilize flowid correctly.
* Put test code under INVARIANTS.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231415 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r218393:
tuexen [Fri, 10 Feb 2012 19:49:35 +0000 (19:49 +0000)]
MFC r218393:
If not set (due to some error Michael is working on
fixing) set it for the net.
From rrs@.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231414 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r218392:
tuexen [Fri, 10 Feb 2012 19:47:15 +0000 (19:47 +0000)]
MFC r218392:
1) Track when flowid does get set.
From rrs@.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231413 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r218371:
tuexen [Fri, 10 Feb 2012 19:40:19 +0000 (19:40 +0000)]
MFC r218371:
1) Use same scheme Michael and I discussed for a selected for a flowid
2) If flowid is not set, arrange so it is stored.
3) If flowid is set by lower layer, use it.
From rrs@.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231412 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r218335:
tuexen [Fri, 10 Feb 2012 19:37:23 +0000 (19:37 +0000)]
MFC r218335:
Add support for M_FLOWID.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231411 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r218319:
tuexen [Fri, 10 Feb 2012 19:29:38 +0000 (19:29 +0000)]
MFC r218319:
1) Typo correction in comments and one spacing change.
2) Mass update to all copyrights.
From rrs@.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231410 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r218269:
tuexen [Fri, 10 Feb 2012 19:27:03 +0000 (19:27 +0000)]
MFC r218269:
1) Fix cpu mapping per JB's suggestions
2) Fix it so INIT's don't always end up on CPU0
From rrs@.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231409 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r218241:
tuexen [Fri, 10 Feb 2012 19:22:21 +0000 (19:22 +0000)]
MFC r218241:
Fix several bugs in the stream schedulers.
From Robin Seggelmann.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231408 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r218235:
tuexen [Fri, 10 Feb 2012 19:19:15 +0000 (19:19 +0000)]
MFC r218235:
Make sure that changing the ECN sysctl does not affect
exisiting associations and endpoints.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231407 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r218232:
tuexen [Fri, 10 Feb 2012 19:15:05 +0000 (19:15 +0000)]
MFC r218232:
1) Move per John Baldwin to mp_maxid
2) Some signed/unsigned errors found by Mac OS compiler (from Michael)
3) a couple of copyright updates on the effected files.
From rrs@.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231405 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r218219:
tuexen [Fri, 10 Feb 2012 19:12:23 +0000 (19:12 +0000)]
MFC r218219:
Fix the per CPU stats so that:
1) They don't use the giant "MAX_CPU" define and instead
   are allocated dynamically based on mp_ncpus
2) Will zero with the netstat -z -s -p sctp
3) Will be properly handled by both the sctp_init and finish
   (the multi-net stuff was incorrectly bzero'ing in sctp_init
    the wrong size.. the bzero is now moved to the right places).
    And of course the free is put in at the very end.
From rrs@.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231404 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r218211:
tuexen [Fri, 10 Feb 2012 19:10:09 +0000 (19:10 +0000)]
MFC r218211:
Adds an experimental option to create a pool of
threads. These serve as input threads and are queued
packets based on the V-tag number. This is similar to
what a modern card can do with queue's for TCP... but
alas modern cards know nothing about SCTP.
From rrs@.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231403 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r218186:
tuexen [Fri, 10 Feb 2012 19:07:32 +0000 (19:07 +0000)]
MFC r218186:
1) Allow a chunk to track the cwnd it was at when sent.
2) Add separate max-bursts for retransmit and hb. These
   are set to sysctlable values but not settable via the
   socket api. This makes sure we don't blast out HB's or
   fast-retransmits.
3) Determine on the first data transmission on a net if
   its local-lan (by being under or over a RTT). This
   can later be used to think about different algorithms
   based on locallan vs big-i (experimental)
4) The cwnd should NOT be allowed to grow when an ECNEcho
   is seen (TCP has this same bug). We fix this in SCTP
   so an ECNe being seen prevents an advance of cwnd.
5) CWR's should not be sent multiple times to the
   same network, instead just updating the TSN being
   transmitted if needed.
From rrs@.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231402 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r218129:
tuexen [Fri, 10 Feb 2012 19:04:26 +0000 (19:04 +0000)]
MFC r218129:
More ECN fixes:
1) We now remove ECN-Nonce since it will no longer continue as a I-D
2) Eliminate last_tsn_echo, this tied us to an assoc not the net
   and thus we were not doing m-homing on the ECN-Echo senders side right.
3) Increment the count going out even if the TSN in lower in the pending
   ECN-Echo, this way the receiver knows exactly how many packets were
   marked even with network re-ordering
4) Fix so we DO NOT stop doing delayed sack if a ECN Echo is in queue

git-svn-id: svn://svn.freebsd.org/base/stable/8@231401 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r218072:
tuexen [Fri, 10 Feb 2012 19:02:07 +0000 (19:02 +0000)]
MFC r218072:
Fixes to ECN in SCTP.
1) ECN was on an association basis, this is incorrect and
   will not work with CMT or for that matter if the user
   is sending to multiple addresses. This commit makes
   ECN on a per path basis.
2) Adopt the new format for the ECN internet draft. This also
   maintains compatability with old format chunks as well.
3) Keep track of the real time of a RTT down to micro seconds.
   For some future conditional features (for like a data center
   this is good information to have).
From rrs@.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231400 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r218039:
tuexen [Fri, 10 Feb 2012 18:58:36 +0000 (18:58 +0000)]
MFC r218039:
Keep track of the real last RTT on each net.
This will be used for Data Center congestion
control, we won't want to engage it in the
ECN code unless we KNOW that the RTT is less
than 500us.
From rrs@

git-svn-id: svn://svn.freebsd.org/base/stable/8@231399 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r218037:
tuexen [Fri, 10 Feb 2012 18:55:50 +0000 (18:55 +0000)]
MFC r218037:
Fix a bug in the way ECN-Echo chunk
sends were being accounted for. The
counting was such that we counted only
when we queued a chunk, not when we sent it.
Now keep an additional counter for queuing and
one for sending.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231398 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r217913:
tuexen [Fri, 10 Feb 2012 18:53:39 +0000 (18:53 +0000)]
MFC r217913:
* Use 300 ms as the default for RTO_MIN.
* Disable burst mitigation by default.
* Remove unused constant.
Discussed with rrs.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231397 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r217894:
tuexen [Fri, 10 Feb 2012 18:49:28 +0000 (18:49 +0000)]
MFC r217894:
Change infrastructure for SCTP_MAX_BURST to allow compliance
with the latest socket API ID. Especially it can be disabled.

Full compliance needs changing the structure used in the
socket option. Since this breaks the API, it will be a
seperate commit which will not be MFCed to stable/8.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231396 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r217760:
tuexen [Fri, 10 Feb 2012 18:43:04 +0000 (18:43 +0000)]
MFC r217760:
Add stream scheduling support.
This work is based on a patch received from Robin Seggelmann.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231395 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 231170
ken [Fri, 10 Feb 2012 18:15:45 +0000 (18:15 +0000)]
MFC 231170

Update the mps(4) man page for the changes in the new LSI-supported driver.

This should have been included in change 230592.

The supported hardware section still needs some updating to reflect
the current reality.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231393 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r217554:
tuexen [Fri, 10 Feb 2012 17:49:14 +0000 (17:49 +0000)]
MFC r217554:

Specify a CTLTYPE_FOO so that a future sysctl(8) change does not need
to rely on the format string.  For SYSCTL_PROC instances that I
noticed a discrepancy between the CTLTYPE and the format specifier,
fix the CTLTYPE.

The commit is from mdf@ and the MFC has been discussed with him.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231391 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230403.
brooks [Fri, 10 Feb 2012 15:54:39 +0000 (15:54 +0000)]
MFC r230403.

When creating the jails /dev/log symlink, do it by full path to avoid
creating stray "log" symlinks if the mount fails.  That apparently
happens in some ezjail configs.

PR: conf/143084
Submitted by: Dirk Engling <erdgeist at erdgeist.org>

git-svn-id: svn://svn.freebsd.org/base/stable/8@231389 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231144:
mm [Fri, 10 Feb 2012 13:36:39 +0000 (13:36 +0000)]
MFC r231144:
Merge illumos revision 13594:

uninitialized variables in zfs(8) may make snapshots undestroyable [1]

References:
https://www.illumos.org/issues/2067 [1]

Obtained from: illumos (issue #2067)
PR: bin/164802

git-svn-id: svn://svn.freebsd.org/base/stable/8@231382 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223741:
bz [Fri, 10 Feb 2012 13:15:11 +0000 (13:15 +0000)]
MFC r223741:

 Tag mbufs of all incoming frames or packets with the interface's FIB
 setting (either default or if supported as set by SIOCSIFFIB, e.g.
 from ifconfig).

 Submitted by: Alexander V. Chernikov (melifaro ipfw.ru)
 Reviewed by: julian

git-svn-id: svn://svn.freebsd.org/base/stable/8@231380 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228191:
dougb [Fri, 10 Feb 2012 10:23:20 +0000 (10:23 +0000)]
MFC r228191:

Ensure kldxref is run first.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231374 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r208307:
dougb [Fri, 10 Feb 2012 10:18:30 +0000 (10:18 +0000)]
MFC r208307:

This change does the following for the scripts that run up through
FILESYSTEMS (the default early_late_divider):
1. Move sysctl to run first
2. Move as many BEFOREs to REQUIREs as possible.
3. Minor effect, move hostid_save from right before mdconfig to right
   after.

A lot of the early scripts make use of sysctl one way or another so
running this first makes a lot of sense given that system-critical
values are often placed in sysctl.conf. (More details in original log.)

In addition to the changes from this revision, tweak a few other rcorder
elements in order to minimize the differences between the order before
and after this change, mostly related to scripts still in this branch
that are no longer in HEAD.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231372 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoPull up mergeinfo from r226345,226464,226879 to etc/ where it belongs
dougb [Fri, 10 Feb 2012 09:46:59 +0000 (09:46 +0000)]
Pull up mergeinfo from r226345,226464,226879 to etc/ where it belongs

git-svn-id: svn://svn.freebsd.org/base/stable/8@231366 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r217742:
tuexen [Fri, 10 Feb 2012 07:52:51 +0000 (07:52 +0000)]
MFC r217742:
Remove unnecessary checking of variable.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231364 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r217638:
tuexen [Fri, 10 Feb 2012 07:51:28 +0000 (07:51 +0000)]
MFC r217638:
Improve comments.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231363 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r217635:
tuexen [Fri, 10 Feb 2012 07:49:57 +0000 (07:49 +0000)]
MFC r217635:
Fix it so we align with new socket API draft for
state's in destination (i.e. ACTIVE/INACTIVE/UNCONFIRMED)
From rrs@.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231362 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r217611:
tuexen [Fri, 10 Feb 2012 07:47:34 +0000 (07:47 +0000)]
MFC r217611:
Cleanup the management of CC functions.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231361 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r217469:
tuexen [Fri, 10 Feb 2012 07:44:03 +0000 (07:44 +0000)]
MFC r217469:
Add support for resource pooling to CMT.
An original version of the patch was developed by Martin Becke
and Thomas Dreibholz.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231360 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r215817:
tuexen [Fri, 10 Feb 2012 07:42:38 +0000 (07:42 +0000)]
MFC r215817:
Adds new dtrace for cwnd functions and lay's
groundwork for future dtrace points (rwnd flightsize etc).
From rrs@.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231359 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r216887:
tuexen [Fri, 10 Feb 2012 07:31:50 +0000 (07:31 +0000)]
MFC r216887:
Bugfix: Make sure that the COMM_UP notificatin is delivered first also
        on the passive side.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231358 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r216878:
tuexen [Fri, 10 Feb 2012 07:30:15 +0000 (07:30 +0000)]
MFC r216878:
Fix a typo.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231357 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 216825:
tuexen [Fri, 10 Feb 2012 07:28:37 +0000 (07:28 +0000)]
MFC 216825:
Define and use SCTP_SSN_GE, SCTP_SSN_GT, SCTP_TSN_GE, SCTP_TSN_GT macros
and use them instead of the generic compare_with_wrap.
Retire compare_with_wrap.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231356 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r216822:
tuexen [Fri, 10 Feb 2012 07:26:45 +0000 (07:26 +0000)]
MFC r216822:
Code cleanup: Use LIST_FOREACH, LIST_FOREACH_SAFE, TAILQ_FOREACH,
              TAILQ_FOREACH_SAFE where appropriate.
No functional change.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231355 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r216821:
tuexen [Fri, 10 Feb 2012 07:23:42 +0000 (07:23 +0000)]
MFC r216821:
Fix three bugs related to the sequence number wrap-around affecting
the processing of ECNE and ASCONF chunks.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231354 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r216672:
tuexen [Fri, 10 Feb 2012 07:21:29 +0000 (07:21 +0000)]
MFC r216672:
Provide a possibility to configure the inital congestion window to the
value defined in RFC 4960.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231353 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r216669:
tuexen [Fri, 10 Feb 2012 07:19:36 +0000 (07:19 +0000)]
MFC r216669:
Improve plausibility check in sctp_handle_sack().
Allow cmt_on_off to support values 0 (no CMT), 1 (CMT), and 2 (CMT/RP).

git-svn-id: svn://svn.freebsd.org/base/stable/8@231352 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223735:
bz [Fri, 10 Feb 2012 06:42:00 +0000 (06:42 +0000)]
MFC r223735:

 Add infrastructure to allow all frames/packets received on an interface
 to be assigned to a non-default FIB instance.

 Submitted by: cjsp
 Submitted by: Alexander V. Chernikov (melifaro ipfw.ru)
  (original versions)
 Reviewed by: julian
 Reviewed by: Alexander V. Chernikov (melifaro ipfw.ru)

Reviewed by: melifaro

git-svn-id: svn://svn.freebsd.org/base/stable/8@231346 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230861:
ae [Fri, 10 Feb 2012 06:38:57 +0000 (06:38 +0000)]
MFC r230861:
  The scheme code may not know about some inconsistency in the metadata.
  So, add an integrity check after recovery attempt.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231345 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228061:
ae [Fri, 10 Feb 2012 06:35:14 +0000 (06:35 +0000)]
MFC r228061:
  The size of APM could be bigger than number of already allocated entries.
  And the first usable sector should not start from the inside of APM area.

MFC r228076:
  Add an ability to increase number of allocated APM entries when we
  have reserved free space in the APM area.
  Also instead of one write request per each APM entry, use MAXPHYS
  sized writes when we are updating APM.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231343 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223334:
bz [Fri, 10 Feb 2012 06:12:48 +0000 (06:12 +0000)]
MFC r223334:

 Leave an extra comment about flowtable and IPv6 support rectifying a
 previous comment (r206024 in stable/8) to not forget things here in the
 future as well and merge the changes without conflicts.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231340 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223259:
bz [Fri, 10 Feb 2012 06:06:25 +0000 (06:06 +0000)]
MFC r223259:

 Correct a typo in the function name.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231338 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224202:
bz [Fri, 10 Feb 2012 06:02:21 +0000 (06:02 +0000)]
MFC r224202:

 Constantly print the command name and if set include the thread
 name in per-thread mode.

 Discussed with: jhb
 Obtained from:  Ed Maste at Sandvine Incorporated
 Sponsored by:   Sandvine Incorporated

git-svn-id: svn://svn.freebsd.org/base/stable/8@231337 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231111, r231331:
eadler [Fri, 10 Feb 2012 04:10:13 +0000 (04:10 +0000)]
MFC r231111, r231331:
 ports(7) currently makes no mention of LOCALBASE: fix that

PR: 159551
Approved by: gjb

git-svn-id: svn://svn.freebsd.org/base/stable/8@231334 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r230605
rmacklem [Fri, 10 Feb 2012 04:01:17 +0000 (04:01 +0000)]
MFC: r230605
A problem with respect to data read through the buffer cache for both
NFS clients was reported to freebsd-fs@ under the subject "NFS
corruption in recent HEAD" on Nov. 26, 2011. This problem occurred when
a TCP mounted root fs was changed to using UDP. I believe that this
problem was caused by the change in mnt_stat.f_iosize that occurred
because rsize was decreased to the maximum supported by UDP. This
patch fixes the problem by using v_bufobj.bo_bsize instead of f_iosize,
since the latter is set to f_iosize when the vnode is allocated, but
does not change for a given vnode when f_iosize changes.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231332 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230510:
bz [Fri, 10 Feb 2012 00:51:32 +0000 (00:51 +0000)]
MFC r230510:

 Replace random ARIN direct assignment legacy IPs with proper RFC 5735
 TEST-NET1 block for use in documentation and example code addresses.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231327 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230506:
bz [Fri, 10 Feb 2012 00:24:41 +0000 (00:24 +0000)]
MFC r230506:

 Plug a possible ifa_ref leak in case of premature return from in6_purgeaddr().

 Reviewed by: rwatson

git-svn-id: svn://svn.freebsd.org/base/stable/8@231325 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228344:
eadler [Fri, 10 Feb 2012 00:09:21 +0000 (00:09 +0000)]
MFC r228344:
 - Add support for Support SEAGATE DAT Scopion 130

PR: kern/141934
Approved by: cperciva

git-svn-id: svn://svn.freebsd.org/base/stable/8@231322 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230494:
bz [Fri, 10 Feb 2012 00:01:50 +0000 (00:01 +0000)]
MFC r230494:

 Remove unnecessary line break.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231318 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230387:
bz [Thu, 9 Feb 2012 22:54:07 +0000 (22:54 +0000)]
MFC r230387:

 Remove a superfluous INET6 check (no opt_inet6.h included anyway).

git-svn-id: svn://svn.freebsd.org/base/stable/8@231315 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229546:
bz [Thu, 9 Feb 2012 21:33:36 +0000 (21:33 +0000)]
MFC r229546:

 Convert an #ifdef DIAGNOSTIC if/panic to a KASSERT.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231307 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229795:
bz [Thu, 9 Feb 2012 20:57:36 +0000 (20:57 +0000)]
MFC r229795:

 Correct comment for the IPv6 case to say "traffic class" not "TOS"
 as pointed out back in 2009.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231305 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229276:
bz [Thu, 9 Feb 2012 20:54:14 +0000 (20:54 +0000)]
MFC r229276:

 Remove an uneeded inpcb forward declaration and align the function
 declaration following to match the style in the rest of the file.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231302 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFH r226119: Mention tdsignal(9)
bapt [Thu, 9 Feb 2012 16:57:34 +0000 (16:57 +0000)]
MFH r226119: Mention tdsignal(9)

Approved by: des (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@231293 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFH r226166: Document some not-so-recently added trace points
bapt [Thu, 9 Feb 2012 16:55:50 +0000 (16:55 +0000)]
MFH r226166: Document some not-so-recently added trace points

Approved by: des (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@231291 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFH r226506: Look for /boot/config in addition to /boot.config
bapt [Thu, 9 Feb 2012 16:54:06 +0000 (16:54 +0000)]
MFH r226506: Look for /boot/config in addition to /boot.config

Approved by: des (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@231288 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229127:
bz [Thu, 9 Feb 2012 16:12:12 +0000 (16:12 +0000)]
MFC r229127:

 Remove a declaration to a non-existent function.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231285 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFH r226345, r226464, r226879:
bapt [Thu, 9 Feb 2012 14:16:40 +0000 (14:16 +0000)]
MFH r226345, r226464, r226879:
Make dhclient use a pid file. Modify the rc script accordingly, fix some bugs

Approved by: des (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@231278 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFH r227531: Add netcat (nc) to /rescue.
bapt [Thu, 9 Feb 2012 13:23:44 +0000 (13:23 +0000)]
MFH r227531: Add netcat (nc) to /rescue.

Approved by: des (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@231272 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFH r226504: Make ktrace(1) build cleanly at WARNS level 6
bapt [Thu, 9 Feb 2012 09:24:52 +0000 (09:24 +0000)]
MFH r226504: Make ktrace(1) build cleanly at WARNS level 6

Approved by: des (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@231264 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224011:
bz [Thu, 9 Feb 2012 09:23:37 +0000 (09:23 +0000)]
MFC r224011:

 Fix indentation.

 Obtained from: Ed Maste at Sandvine Incorporated
 Sponsored by: Sandvine Incorporated

git-svn-id: svn://svn.freebsd.org/base/stable/8@231262 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFH r226502,r226503: factor out the common code and fix two display bugs
bapt [Thu, 9 Feb 2012 09:20:50 +0000 (09:20 +0000)]
MFH r226502,r226503: factor out the common code and fix two display bugs

Approved by: des (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@231261 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223739:
bz [Thu, 9 Feb 2012 08:41:56 +0000 (08:41 +0000)]
MFC r223739:

 Remove extra white space to comply with style for the rest of the struct.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231258 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223667:
bz [Thu, 9 Feb 2012 07:52:45 +0000 (07:52 +0000)]
MFC r223667:

 In case ntp cannot resolve a hostname on startup it will queue the entry
 for resolving by a child process that, upon success, will add the entry
 to the config of the running running parent process.

 Unfortunately there are a couple of bugs with this, fixed in various
 later versions of upstream in potentially different ways due to other
 code changes:

 1) Upon server [-46] <FQDN> the [-46] are used as FQDN for later resolving
    which does not work.  Make sure we always pass the name (or IP there).

 2) The intermediate file to carry the information to the child process
    does not know about -4/-6 restrictions, so that a dual-stacked host
    could resolve to an IPv6 address but that might be unreachable (see
    r223626) leading to no working synchronization ignoring a IPv4 record.
    Thus alter the intermediate format to also pass the address family
    (AF_UNSPEC (default), AF_INET or AF_INET6) to the child process
    depending on -4 or -6.

 3) Make the child process to parse the new intermediate file format and
    save the address family for getaddrinfo() hints flags.

 4) Change child to always reload resolv.conf calling res_init() before
    trying to resolve names.  This will pick up resolv.conf changes or
    new resolv.confs should they have not existed or been empty or
    unusable on ntp startup.  This fix is more conditional in upstream
    versions but given FreeBSD has res_init there is no need for the
    configure logic as well.

 Approved by: roberto
 Sponsored by: Sandvine Incorporated

git-svn-id: svn://svn.freebsd.org/base/stable/8@231256 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230921:
mav [Thu, 9 Feb 2012 07:45:02 +0000 (07:45 +0000)]
MFC r230921:
Insert ordered command every 1/4 of the current command timeout, not 1/4
of the default one.

Without this change setting kern.cam.ada.default_timeout to 1 instead of 30
allowed me to trigger several false positive command timeouts under heavy
ZFS load on a SiI3132 siis(4) controller with 5 HDDs on a port multiplier.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231254 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230912:
mav [Thu, 9 Feb 2012 07:40:13 +0000 (07:40 +0000)]
MFC r230912:
Make CAM ATA honor old hw.ata.ata_dma and hw.ata.atapi_dma tunables.

Even having more specific hint.ata.X.mode controls, global ones are
still could be useful from some points, including compatibility.

PR:             kern/164651

git-svn-id: svn://svn.freebsd.org/base/stable/8@231252 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMRC r223626:
bz [Thu, 9 Feb 2012 07:27:59 +0000 (07:27 +0000)]
MRC r223626:

 Compare port numbers correctly.  They are stored by SRCPORT()
 in host byte order, so we need to compare them as such.
 Properly compare IPv6 addresses as well.

 This allows the, by default, 8 badaddrs slots per address
 family to work correctly and only print sendto() errors once.

 The change is no longer applicable to any latest upstream versions.

 Approved by: roberto
 Sponsored by: Sandvine Incorporated

git-svn-id: svn://svn.freebsd.org/base/stable/8@231249 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFH r230307: fix SIGINFO-related data corruption bug
bapt [Thu, 9 Feb 2012 06:50:43 +0000 (06:50 +0000)]
MFH r230307: fix SIGINFO-related data corruption bug

Approved by: des (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@231248 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMerge from head to stable/8:
scf [Thu, 9 Feb 2012 01:18:23 +0000 (01:18 +0000)]
Merge from head to stable/8:

r230656:
msdos was renamed to msdosfs in 2001 by r77577.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231242 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoGiven that sun4u uses sparc64/sparc64/ofw_machdep.c, use the sparc64
marius [Wed, 8 Feb 2012 23:57:03 +0000 (23:57 +0000)]
Given that sun4u uses sparc64/sparc64/ofw_machdep.c, use the sparc64
<machine/ofw_machdep.h> here also. This isn't exactly a clean approach
though as ofw_machdep.h also includes some prototypes for functions
that aren't actually shared between both architectures but just happen
to have the same interface. Given that the sun4v support actually is
dead and this is just to allow things to continue to compile it should
be okay though.

This is a direct commit to stable/8.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231239 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMerge from r230889:
marius [Wed, 8 Feb 2012 23:47:22 +0000 (23:47 +0000)]
Merge from r230889:

Mark cpu_{halt,reset}() and hv_mach_{exit,sir}() as __dead2 as appropriate.

This is a direct commit to stable/8.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231237 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMerge from head to stable/8:
scf [Wed, 8 Feb 2012 23:13:21 +0000 (23:13 +0000)]
Merge from head to stable/8:

r230655:
Since April 2, 2006, Indiana has observed DST.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231234 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r227285:
hselasky [Wed, 8 Feb 2012 22:29:41 +0000 (22:29 +0000)]
MFC r227285:
Add support for new USB modem protocol.

PR: usb/159919

git-svn-id: svn://svn.freebsd.org/base/stable/8@231231 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229317:
hselasky [Wed, 8 Feb 2012 22:27:07 +0000 (22:27 +0000)]
MFC r229317:
Fix support for suspend and resume.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231230 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223359:
bz [Wed, 8 Feb 2012 19:31:32 +0000 (19:31 +0000)]
MFC r223359:

 Garbage collect never used global, sysctl, externs.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231225 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228641:
bz [Wed, 8 Feb 2012 18:51:20 +0000 (18:51 +0000)]
MFC r228641:

 Allow toggling of IFCAP_VLAN_HWCSUM for hardware that supports checksum
 offloading on vlans and document the new option.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231222 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoRemove sun4v from universe targets.
bz [Wed, 8 Feb 2012 18:21:48 +0000 (18:21 +0000)]
Remove sun4v from universe targets.

Approved by: re

git-svn-id: svn://svn.freebsd.org/base/stable/8@231218 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r222845:
bz [Wed, 8 Feb 2012 17:54:02 +0000 (17:54 +0000)]
MFC r222845:

 Correct comments and debug logging in ipsec to better match reality.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231216 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225428:
bz [Wed, 8 Feb 2012 17:03:12 +0000 (17:03 +0000)]
MFC r225428:

 Shorten a variable access some using a cached value rather than
 casting the input argument again, making the code more readable.

 Reviewed by: jhb

git-svn-id: svn://svn.freebsd.org/base/stable/8@231214 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225036:
bz [Wed, 8 Feb 2012 16:44:54 +0000 (16:44 +0000)]
MFC r225036:

 Hide IPv6 next header parsing warnings under the verbose sysctl
 so people can possibly disable it when their consoles are flooded,
 or enabled it for debugging.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231212 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225033:
bz [Wed, 8 Feb 2012 16:24:56 +0000 (16:24 +0000)]
MFC r225033:

 If we detect an IPv6 fragment header and it is not the first fragment,
 then terminate the loop as we will not find any further headers and
 for short fragments this could otherwise lead to a pullup error
 discarding the fragment.

 Submitted by: Matthew Luckie (mjl luckie.org.nz)
PR: kern/145733

git-svn-id: svn://svn.freebsd.org/base/stable/8@231210 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225032,225034:
bz [Wed, 8 Feb 2012 16:03:05 +0000 (16:03 +0000)]
MFC r225032,225034:

 ipfw internally checks for offset == 0 to determine whether the
 packet is a/the first fragment or not.  For IPv6 we have added the
 "more fragments" flag as well to be able to determine on whether
 there will be more as we do not have the fragment header avaialble
 for logging, while for IPv4 this information can be derived directly
 from the IPv4 header.  This allowed fragmented packets to bypass
 normal rules as proper masking was not done when checking offset.
 Split variables to not need masking for IPv6 to avoid further errors.

 After r225032 fix logging in a similar way masking the the IPv6
 more fragments flag off so that offset == 0 checks work properly.

 Submitted by: Matthew Luckie (mjl luckie.org.nz)
PR: kern/145733

git-svn-id: svn://svn.freebsd.org/base/stable/8@231208 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225030:
bz [Wed, 8 Feb 2012 15:37:34 +0000 (15:37 +0000)]
MFC r225030:

 While not explicitly allowed by RFC 2460, in case there is no
 translation technology involved (and that section is suggested to
 be removed by Errata 2843), single packet fragments do not harm.

 There is another errata and further drafts under discussion to clarify
 on these kinds of packets.
 Meanwhile add a sysctl to allow disabling this behaviour again.
 We will treat single packet fragment (a fragment header added
 when not needed) as if there was no fragment header.

 Submitted by: Matthew Luckie (mjl luckie.org.nz) (original version)
PR: kern/145733

git-svn-id: svn://svn.freebsd.org/base/stable/8@231206 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230553:
kib [Wed, 8 Feb 2012 15:19:49 +0000 (15:19 +0000)]
MFC r230553:
When doing vflush(WRITECLOSE), clean vnode pages.

Unmounts do vfs_msync() before calling VFS_UNMOUNT(), but there is
still a race allowing a process to dirty pages after msync
finished. Remounts rw->ro just left dirty pages in system.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231205 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 230877:
mav [Wed, 8 Feb 2012 07:31:55 +0000 (07:31 +0000)]
MFC 230877:
Fix NULL dereference panic on attempt to turn off (on system shutdown)
disconnected swap device.

This is quick and imperfect solution, as swap device will still be opened
and GEOM will not be able to destroy it. Proper solution would be to
automatically turn off and close disconnected swap device, but with existing
code it will cause panic if there is at least one page on device, even if
it is unimportant page of the user-level process. It needs some work.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231189 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f