]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
8 years agoMFC r283295: ipf(1): Use strchr(3) instead of deprecated index(3)
emaste [Fri, 29 May 2015 17:43:14 +0000 (17:43 +0000)]
MFC r283295: ipf(1): Use strchr(3) instead of deprecated index(3)

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r282810:
tuexen [Fri, 29 May 2015 13:37:04 +0000 (13:37 +0000)]
MFC r282810:

Ensure that the COOKIE-ACK can be sent over UDP if the COOKIE-ECHO was
received over UDP.
Thanks to Felix Weinrank for makeing me aware of the problem and to
Irene Ruengeler for providing the fix.

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

8 years agoMFC r282042:
tuexen [Fri, 29 May 2015 13:34:31 +0000 (13:34 +0000)]
MFC r282042:

Don't panic under INVARIANTS when receiving a SACK which cumacks
a TSN never sent.
While there, fix two typos.

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

8 years agoMFC r281884:
tuexen [Fri, 29 May 2015 13:32:08 +0000 (13:32 +0000)]
MFC r281884:

A complete user message is signalled with the MSG_EOR flag, not the MSG_EOF
flag.
Thanks to Valentin Nechayev for reporting the issue.

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

8 years agoMFC r281202:
tuexen [Fri, 29 May 2015 13:30:37 +0000 (13:30 +0000)]
MFC r281202:

The code says "or", not "either or". So fix the documentation.

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

8 years agoMFC r280782:
tuexen [Fri, 29 May 2015 13:28:24 +0000 (13:28 +0000)]
MFC r280782:

Add an SCTP symbol which was missed in
https://svnweb.freebsd.org/base?view=revision&revision=169622
This fixes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197783
Thanks to Jukka Ukkonen for reporting the bug and providing a fix.

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

8 years agoMFC r280714:
tuexen [Fri, 29 May 2015 13:26:05 +0000 (13:26 +0000)]
MFC r280714:

Improve the selection of the destination address of SACK chunks.
This fixes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196755
and is joint work with rrs@.

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

8 years agoMFC r280642:
tuexen [Fri, 29 May 2015 13:23:16 +0000 (13:23 +0000)]
MFC r280642:

Make sure that we don't free an SCTP shared key too early.
Thanks to Pouyan Sepehrdad from Qualcomm Product Security Initiative
for reporting the issue.

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

8 years agoMFC r280634:
tuexen [Fri, 29 May 2015 13:20:39 +0000 (13:20 +0000)]
MFC r280634:

Use the reference count of the right SCTP inp.
Joint work with rrs@

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

8 years agoMFC r280459:
tuexen [Fri, 29 May 2015 13:18:10 +0000 (13:18 +0000)]
MFC r280459:

Fix two bugs which resulted in a screwed up end point list:
* Use a save way to walk throught a list while manipulting it.
* Have to appropiate locks in place.
Joint work with rrs@

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

8 years agoMFC r280440:
tuexen [Fri, 29 May 2015 13:13:12 +0000 (13:13 +0000)]
MFC r280440:

Fix the bug in the handling of fragmented abandoned SCTP user messages reported in
https://code.google.com/p/sctp-refimpl/issues/detail?id=11
Thanks to Lally Singh for reporting it.

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

8 years agoMFC r280439:
tuexen [Fri, 29 May 2015 13:11:13 +0000 (13:11 +0000)]
MFC r280439:

Fix an accounting bug related to the per stream chunk counter.
While there, don't refer to a net articifically.

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

8 years agoMFC r280404:
tuexen [Fri, 29 May 2015 13:08:43 +0000 (13:08 +0000)]
MFC r280404:

When an ICMP message is received and the MTU shrinks, only
mark outstanding chunks for retransmissions.

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

8 years agoMFC r280371:
tuexen [Fri, 29 May 2015 13:06:15 +0000 (13:06 +0000)]
MFC r280371:

Remove a useless assignment.

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

8 years agoMFC r279886:
tuexen [Fri, 29 May 2015 13:02:00 +0000 (13:02 +0000)]
MFC r279886:

Fix the adaptation of the path state when thresholds are changed
using the SCTP_PEER_ADDR_THLDS socket option.

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

8 years agoMFC r279867:
tuexen [Fri, 29 May 2015 12:59:18 +0000 (12:59 +0000)]
MFC r279867:

Keep track on the socket lock state. This fixes a bug showing up on
Mac OS X.

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

8 years agoMFC r279863:
tuexen [Fri, 29 May 2015 12:57:04 +0000 (12:57 +0000)]
MFC r279863:

Unlock the stcb when using setsockopt() for the SCTP_PEER_ADDR_THLDS option.

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

8 years agoMFC r279859:
tuexen [Fri, 29 May 2015 12:54:30 +0000 (12:54 +0000)]
MFC r279859:

Add a SCTP socket option to limit the cwnd for each path.

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

8 years agoMFC r279841:
tuexen [Fri, 29 May 2015 12:50:53 +0000 (12:50 +0000)]
MFC r279841:

Fix a typo.

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

8 years agoMFC r277815:
tuexen [Fri, 29 May 2015 12:48:14 +0000 (12:48 +0000)]
MFC r277815:

Whitespace change.

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

8 years agoMFC r277424:
tuexen [Fri, 29 May 2015 12:45:55 +0000 (12:45 +0000)]
MFC r277424:

Remove comparisons which are not necessary.
With manual intervention.

Reported by: Coverity
CID: 123782612378441237847

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

8 years agoMFC r277380:
tuexen [Fri, 29 May 2015 12:35:21 +0000 (12:35 +0000)]
MFC r277380:

Code cleanup.

Reported by: Coverity
CID: 749578

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

8 years agoMFC r277350:
tuexen [Fri, 29 May 2015 12:33:02 +0000 (12:33 +0000)]
MFC r277350:

Fix a bug which only shows up when an mbuf allocation failed.
Therefore chances are low that we hit this.

Reported by: Coverity
CID: 1018886

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

8 years agoMFC r277348:
tuexen [Fri, 29 May 2015 12:30:19 +0000 (12:30 +0000)]
MFC r277348:

Remove an unnecessary check.

Reported by: Coverity
CID: 749576

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

8 years agoMFC r277347:
tuexen [Fri, 29 May 2015 12:27:45 +0000 (12:27 +0000)]
MFC r277347:

Add protection code to free memory in case of processing an address which
is neither IPv4 or IPv6.

Reported by: Coverity
CID: 749311

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

8 years agoMFC r277337:
tuexen [Fri, 29 May 2015 12:25:11 +0000 (12:25 +0000)]
MFC r277337:

Remove an unused variable.

Reported by: Coverity
CID: 750999

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

8 years agoMFC r277053:
tuexen [Fri, 29 May 2015 12:22:35 +0000 (12:22 +0000)]
MFC r277053:

Remove dead code.

Reported by: Coverity
CID: 748664

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

8 years agoMFC r277049:
tuexen [Fri, 29 May 2015 12:19:41 +0000 (12:19 +0000)]
MFC r277049:

Remove dead code.

Reported by: Coverity
CID: 1018052

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

8 years agoMFC r277046:
tuexen [Fri, 29 May 2015 12:17:21 +0000 (12:17 +0000)]
MFC r277046:

Remove dead code.

Reported by: Coverity
CID: 1018053

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

8 years agoMFC r277034:
tuexen [Fri, 29 May 2015 12:13:52 +0000 (12:13 +0000)]
MFC r277034:

Remove dead code.

Reported by: Coverity
CID: 748663

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

8 years agoMFC r277033:
tuexen [Fri, 29 May 2015 12:11:14 +0000 (12:11 +0000)]
MFC r277033:

Remove dead code.

Reported by: Coverity
CID: 748660, 748661

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

8 years agoMFC r277031
tuexen [Fri, 29 May 2015 12:08:49 +0000 (12:08 +0000)]
MFC r277031

Remove dead code.

Reported by: Coverity
CID: 748665

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

8 years agoMFC r277030:
tuexen [Fri, 29 May 2015 12:06:00 +0000 (12:06 +0000)]
MFC r277030:

Remove dead code.

Reported by: Coverity
CID: 748666

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

8 years agoMFC r276914:
tuexen [Fri, 29 May 2015 12:03:02 +0000 (12:03 +0000)]
MFC r276914:

Minimize the usage of SCTP_BUF_IS_EXTENDED.
This should help Robert...

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

8 years agoMFC r276009:
tuexen [Fri, 29 May 2015 11:52:32 +0000 (11:52 +0000)]
MFC r276009:

Don't check twice that inp is not NULL.

Reported by: Coverity
CID: 748671

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

8 years agoMFC r275967:
tuexen [Fri, 29 May 2015 11:47:54 +0000 (11:47 +0000)]
MFC r275967:

Fix and harmonize the validation of PR-SCTP policies.

Reported by: Coverity
CID: 1232044

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

8 years agoMFC r275954:
tuexen [Fri, 29 May 2015 11:43:51 +0000 (11:43 +0000)]
MFC r275954:

Cleanup the code.

Reported by: Coverity
CID: 1232003

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

8 years agoMFC r275869:
tuexen [Fri, 29 May 2015 11:40:50 +0000 (11:40 +0000)]
MFC r275869:

Add a missing break.

Reported by: Coverity
CID: 1232014

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

8 years agoMFC r275868:
tuexen [Fri, 29 May 2015 11:25:38 +0000 (11:25 +0000)]
MFC r275868:

Plug a memory leak in an error code path.

Reported by: Coverity
CID: 1018936

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

8 years agoMFC r275857:
tuexen [Fri, 29 May 2015 11:21:34 +0000 (11:21 +0000)]
MFC r275857:

Initilize the msg_flags field consistently in all code paths.

Reported by: Coverity
CID: 1018726

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

8 years agoMFC r275682:
tuexen [Fri, 29 May 2015 11:19:30 +0000 (11:19 +0000)]
MFC r275682:

Fix a typo reported by Lennart Grahl.

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

8 years agoMFC r275574:
tuexen [Fri, 29 May 2015 11:18:06 +0000 (11:18 +0000)]
MFC r275574:

Include the received chunk padding when reporting an unknown chunk.

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

8 years agoMFC r275567:
tuexen [Fri, 29 May 2015 11:15:00 +0000 (11:15 +0000)]
MFC r275567:

Fix the support of mapped IPv4 addresses.
Thanks to Mark Bonnekessel and Markus Boese for making me aware of the
problems.

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

8 years agoMFC r273925:
tuexen [Fri, 29 May 2015 11:04:55 +0000 (11:04 +0000)]
MFC r273925:

Don't zero the stats before they are read out.

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

8 years agoMFC r273634:
tuexen [Fri, 29 May 2015 11:01:46 +0000 (11:01 +0000)]
MFC r273634:

Fix a use of an uninitialized variable by makeing sure
that sctp_med_chunk_output() always initialized the reason_code
instead of relying on the caller.
The variable is only used for debugging purpose.
This issue was reported by Peter Bostroem from Google.

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

8 years agoMFC r282948:
kib [Fri, 29 May 2015 07:48:30 +0000 (07:48 +0000)]
MFC r282948:
Use bare mmap(2) to allocate space for the per-thread keys,
instead of malloc(). This allows third party mallocs, which use
pthread_setspecific(3) on the allocation path, to work.

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

8 years agoMFC: r283599
arybchik [Fri, 29 May 2015 05:58:21 +0000 (05:58 +0000)]
MFC: r283599

sfxge: mask ifmedia options (pauses) when looking for matching mode

Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r277915:
markj [Fri, 29 May 2015 04:22:57 +0000 (04:22 +0000)]
MFC r277915:
Don't attempt to disable enabled fasttrap probes in an exiting process.

MFC r277914:
fasttrap_sigtrap(): use tdsendsignal() to send SIGTRAP.

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

8 years agoMFC r281915:
markj [Fri, 29 May 2015 04:01:39 +0000 (04:01 +0000)]
MFC r281915:
Make vpanic() externally visible.

MFC r281916:
Fix DTrace's panic() action.

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

8 years agoMFC r282331:
markj [Fri, 29 May 2015 03:47:35 +0000 (03:47 +0000)]
MFC r282331:
Don't drop the idr lock before verifying that the newly-inserted element
is present in the tree.

MFC r282741:
find_next_bit() and find_next_zero_bit(): if the caller-specified offset
lies within the last block of the bit set and no bits are set beyond the
offset, terminate the search immediately instead of continuing as though
there are further blocks in the set and subsequently returning an incorrect
result.

MFC r282743:
Ensure that msecs_to_jiffies(0) == 0.

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

8 years agoMFC r283573, r283574, r283575, r283576, r283580, r283593, r283618:
gjb [Fri, 29 May 2015 00:46:14 +0000 (00:46 +0000)]
MFC r283573, r283574, r283575, r283576, r283580, r283593, r283618:

 r283573:
  Remove a continuation on error, since the relevant behavior can
  only occur if a particular file exists.

 r283574:
  Set STAGE_TARGETS only if RELEASEDIR exists.

 r283575:
  Remove duplicate exists() sanity check.

 r283576:
  Reindent after previous commit.

 r283580:
  Use SVNREVISION and BUILDDATE if passed into the make(1)
  environment, fallback to trying to figure it out otherwise.

 r283593:
  Fix a typo in a comment.

 r283618:
  Invert the build date and svn revision to match the namimg
  convention that has been in use for a while.

Sponsored by: The FreeBSD Foundation

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

8 years agoFix build issue and incompatibilites introduced by r283620.
erj [Thu, 28 May 2015 20:56:11 +0000 (20:56 +0000)]
Fix build issue and incompatibilites introduced by r283620.

- Re-introduce "device ixgbe" option for kernel configs. This allows
  users to continue using existing kernel configurations, while still
  letting if_ix and if_ixv exist to allow ifconfig magic to work.
  Though the amd64 GENERIC config has "device ix" and "device ixv" instead of
  "device ixgbe".

  This is achieved by making the if_ixgbe module a stub that depends
  on if_ix and if_ixv.

- Replace if_baudrate assignment with if_initbaudrate() call.

Thanks to jhb@ for the stub module suggestion and pointing out the if_baudrate
error.

Approved by: jfv (mentor)

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

8 years agoFix COMPAT_FREEBSD32 build on ia64. This is a direct commit to
jhb [Thu, 28 May 2015 13:12:05 +0000 (13:12 +0000)]
Fix COMPAT_FREEBSD32 build on ia64.  This is a direct commit to
stable/10 since ia64 is not present in head.

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

8 years agoMFC r283053
whu [Thu, 28 May 2015 09:20:35 +0000 (09:20 +0000)]
MFC r283053

Submitted by: whu
Reviewed by: royger
Approved by: royger
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D2661

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

8 years agoMFC r283254:
dim [Thu, 28 May 2015 06:45:13 +0000 (06:45 +0000)]
MFC r283254:

Ensure that the static structs emitted by the MODULE_DEPEND() and
MODULE_VERSION() macros don't end up as .comm symbols, when all the
version fields are zero.

Normally, such symbols will end up in .bss, but for kernel module
version objects, this can lead to "garbage" version numbers.

Fix this by instructing the compiler to always put these structs in the
.data segment instead.

Reported by: delphij, ae

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

8 years agoMFC of 269533:
mckusick [Thu, 28 May 2015 00:11:36 +0000 (00:11 +0000)]
MFC of 269533:

Limit the number of cylinder groups that will be searched when
trying to build a cluster. The limit is tunable using the sysctl
vfs.ffs.maxclustersearch. The current limit is 10 cylinder groups
per block allocation. It was previously limited to the number of
cylinder groups in the filesystem per block allocation. When there
were no clusters of the needed size left, it repeatedly searched
the whole filesystem for a non-existent cluster on every block
allocation. The result was very slow filesystem allocation with
100% CPU utilization. The old behavior can be had by setting
vfs.ffs.maxclustersearch to a huge number (1,000,000).

This change affects only the layout policy routines so is not able
to interfere with the integrity of the filesystem.

Reported by: Dmitry Sivachenko (demon@)
Tested by:   Dmitry Sivachenko (demon@)

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

8 years agoMFC ixgbe commits for 10.2:
erj [Wed, 27 May 2015 17:44:11 +0000 (17:44 +0000)]
MFC ixgbe commits for 10.2:

- r280182 - Split the driver into independent pf/vf loadables
- r280197 - Resolve build issues
- r280204 - Fix multiple same-name devclasses
- r280228 - Fix i386 LINT build issues / remove unused variable
- r280252 - Fix building ixgbe with gcc
- r280962 - Make changes to busdma code similar to r257541
- r281772 & r281773 - Remove unused variable
- partial r282280 - stats counter update (ix-only)
- r282289 - Add X550 support
- r282290 - Add X550 makefile updates
- r282293 - Add ixgbe_x550.c to conf/files
- r282299 - Fix gcc compile (extraneous extern declaration)

Finally, add ix_txrx.c to conf/files because it's required for compile in stable/10.

Approved by: jfv (mentor)

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

8 years agoMFC 282241:
jhb [Wed, 27 May 2015 14:29:39 +0000 (14:29 +0000)]
MFC 282241:
Don't free mbufs when stopping an interface in netmap mode.

Currently if you ifconfig down a vtnet interface while it is being used
via netmap, the kernel panics due to trying to treat the cookie values
in the virtio rings as mbufs to be freed. When netmap is enabled, these
cookie values are pointers to something else.

Note that other netmap-aware drivers don't seem to need this as they
store the mbuf pointers in the software rings that mirror the hardware
descriptor rings, and since netmap doesn't touch those, the software
state always has NULL mbuf pointers causing the loops to free mbufs to
not do anything. However, vtnet reuses the same state area for both
netmap and non-netmap mode, so it needs to explicitly avoid looking at
the rings and treating the cookie values as mbufs if netmap is
enabled.

Sponsored by: Norse Corp, Inc.

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

8 years agoMFC r283064:
hselasky [Wed, 27 May 2015 13:23:02 +0000 (13:23 +0000)]
MFC r283064:
Fix an off-by-one error by adding proper range checks when parsing the
HDA association descriptors. This fixes a crash during device probe
for some HDA PCI devices.

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

8 years agoMFC r283162:
kib [Wed, 27 May 2015 08:30:16 +0000 (08:30 +0000)]
MFC r283162:
Set VPO_UNMANAGED on the freed page when insertion of the page into the
object queue failed, to satisfy the assertion.

MFC r283163:
Do grammar fix in the comment to record the right commit message for
r283162.

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

8 years agoMFC r283153:
kib [Wed, 27 May 2015 08:23:23 +0000 (08:23 +0000)]
MFC r283153:
Remove the write-only variable phent.

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

8 years agoMFC: 272451, 272653 add CAP_EVENT so that we can poll() on netmap and pcap
luigi [Tue, 26 May 2015 21:12:02 +0000 (21:12 +0000)]
MFC: 272451, 272653 add CAP_EVENT so that we can poll() on netmap and pcap
file descriptors

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

8 years agoMFH: r283114
julian [Tue, 26 May 2015 03:58:18 +0000 (03:58 +0000)]
MFH: r283114
  Fixup to the kern_psignal manpage

  r283105 misspelled kern_psignal as kernel_psignal in one occurrence, and
added trailing whitespace.

 While here, change 'call' to the more standard 'function', and say why
 the name was changed (taken from the commit message for r225617).

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

8 years agoMFC r283110: Add GRP_COMDAT section group flag to ELF header
emaste [Tue, 26 May 2015 02:50:30 +0000 (02:50 +0000)]
MFC r283110: Add GRP_COMDAT section group flag to ELF header

Sponsored by: The FreeBSD Foundation

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

8 years agoMFH: r283105
julian [Tue, 26 May 2015 02:18:10 +0000 (02:18 +0000)]
MFH: r283105
 Only several years late, catch the psignal man page up to the
 fact that psignal has been renamed to kern_psignal since 9.0.

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

8 years agoMFC r283307:
gjb [Tue, 26 May 2015 00:44:29 +0000 (00:44 +0000)]
MFC r283307:
 Use mkimg(1) to create the i386 memstick images, similar to
 how is done for amd64.  The exception here is there is no
 EFI partition for i386.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r282785, r282787, r282789, r282790, r282791, r282792, r282793,
gjb [Mon, 25 May 2015 22:12:30 +0000 (22:12 +0000)]
MFC r282785, r282787, r282789, r282790, r282791, r282792, r282793,
r282794, r282795, r282796, r282797, r282798, r282799, r283265,
r283266, r283268, r283271, r283272, r283298, r283302:

 Add a new file, Makefile.mirrors, which is intended to replace
 a 474-line kludge of a shell script to pre-create the directory
 hierarchy on ftp-master.

 This is not in any way connected to the build, and there is no
 intention to do so.  This only intent here is to try to make
 things a little bit easier.

 Always use the 'make install' directory as the source for images.
 For RE purposes, we use the default (/R within the chroot), so
 this helps avoid copying files multiple times and xz(1)-compressing
 additional times when not needed.

 Fix staging virtual machine images for ftp propagation.

 This Makefile is not for general consumption.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r282475: zfs: do not hold an extra reference on a root vnode
avg [Mon, 25 May 2015 11:35:27 +0000 (11:35 +0000)]
MFC r282475: zfs: do not hold an extra reference on a root vnode

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

8 years agoMFC r282473: dmu_recv_end_check: don't leak hold if dsl_destroy_snapshot_check_impl...
avg [Mon, 25 May 2015 11:33:45 +0000 (11:33 +0000)]
MFC r282473: dmu_recv_end_check: don't leak hold if dsl_destroy_snapshot_check_impl fails

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

8 years agoMFC r282632: MFV r282630: 5809 Blowaway full receive in v1 pool causes kernel panic
avg [Mon, 25 May 2015 11:32:10 +0000 (11:32 +0000)]
MFC r282632: MFV r282630: 5809 Blowaway full receive in v1 pool causes kernel panic

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

8 years agoMFC r283033, r283062, r283066, r283069:
ian [Mon, 25 May 2015 01:29:45 +0000 (01:29 +0000)]
MFC r283033, r283062, r283066, r283069:

  Do not set preload_addr_relocate for ARM.

  Refactor net_getparams() to make it easier to get params from sources other
  than bootp and rarp.

  Add a routine to obtain netboot parameters from the U-Boot env vars

  Enable the NETIF_OPEN_CLOSE_ONCE option for ubldr.

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

8 years agoMFC r277962, r277988, r282661, r282727, r282731, r283013, r283035:
ian [Mon, 25 May 2015 01:06:55 +0000 (01:06 +0000)]
MFC r277962, r277988, r282661, r282727, r282731, r283013, r283035:

  Add support for booting relocatable kernels on PowerPC.

  Add code to support loading relocatable kernels at offsets that are
  not zero.

  Move ubldr text section to the start of the output file, so that when you
  create a stripped .bin file from it the entry point is the first byte of
  the file.  (Will allow "load $addr $file ; go $addr" in u-boot.)

  Create a relocatable instance of ubldr for ARM (ubldr.bin).

  Re-link ubldr when any of its libraries change.

  An ARM kernel can be loaded at any 2MB boundary, make ubldr aware of that.

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

8 years agoMFC r283290
sbruno [Mon, 25 May 2015 00:30:26 +0000 (00:30 +0000)]
MFC r283290

Bump rx_overruns when indicated by the ICR mask.

PR: 199716
Sponsored by: Limelight Networks

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

8 years agoMFC r282516:
ian [Sun, 24 May 2015 19:00:46 +0000 (19:00 +0000)]
MFC r282516:

  Add the code necessary to run the imx6 chip at its lowest clock/power
  operating point (396MHz/950mV).

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

8 years agoMFC r268838, r277644:
ian [Sun, 24 May 2015 18:59:45 +0000 (18:59 +0000)]
MFC r268838, r277644:

  Add support for Toradex Apalis i.MX6 development board.

  Add support for imx6 audio transmitting, include drivers for:
  o Digital Audio Multiplexer (AUDMUX)
  o Smart Direct Memory Access Controller (SDMA)
  o Synchronous Serial Interface (SSI)

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

8 years agoMFC r282418:
ian [Sun, 24 May 2015 18:23:57 +0000 (18:23 +0000)]
MFC r282418:

  On an icache sync by address/len, round the length up if the operation
  spans a cacheline boundary.

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

8 years agoMFC r281371: Use OF_getencpropalloc() to handle endianess of the properties.
ian [Sun, 24 May 2015 18:00:29 +0000 (18:00 +0000)]
MFC r281371: Use OF_getencpropalloc() to handle endianess of the properties.

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

8 years agoMFC r281073, r281074, r281077, r281200:
ian [Sun, 24 May 2015 17:57:29 +0000 (17:57 +0000)]
MFC r281073, r281074, r281077, r281200:

  Use OF_getencprop over OF_getprop and fdt32_to_cpu. The latter may give
  us the wrong data in the failure case if shift was not zero.

  Remove the extra copy of uart_fdt_get_clock and uart_fdt_get_shift. While
  here also use OF_getencprop in uart_fdt_get_clock.

  Move uart_fdt_get_clock and uart_fdt_get_shift to uart_bus_fdt.c, we may
  not build uart_cpu_fdt.c in all configs.

  Fix uart_fdt_get_clock. It should have been using the cell variable passed
  in, not value on the stack.

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

8 years agoMFC r279368, r280772, r280848:
ian [Sun, 24 May 2015 17:51:57 +0000 (17:51 +0000)]
MFC r279368, r280772, r280848:

  Allow creating subclass of FDT simplebus

  Make simplebus a base class of ofwbus.

  Fix bug in xrefinfo_find() for 64-bit platforms

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

8 years agoMFC r282881: Do not promote large async writes to sync.
mav [Sun, 24 May 2015 17:16:30 +0000 (17:16 +0000)]
MFC r282881: Do not promote large async writes to sync.

Present implementation of large sync writes is too strict and so can be
quite slow.  Instead of doing that, execute large async write in chunks,
syncing each chunk separately.

It would be good to fix large sync writes too, but I leave it to somebody
with more skills in this area.

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

8 years agoMFC r280194:
ian [Sun, 24 May 2015 15:29:56 +0000 (15:29 +0000)]
MFC r280194:

  Fix fdt_platform_fixups() mem region handling.

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

8 years agoMFC r279850:
ian [Sun, 24 May 2015 15:21:47 +0000 (15:21 +0000)]
MFC r279850:

  Remove MODULES_OVERRIDE="" for Marvel-based armv5 systems.

  Also add some #NO_UNIVERSE to configs that essentially duplicate DB-88F6XXX.

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

8 years agoMFC r279837:
ian [Sun, 24 May 2015 14:57:17 +0000 (14:57 +0000)]
MFC r279837:

  Remove MODULES_OVERRIDE="" and WITHOUT_MODULES="ahc" from armv6 configs.

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

8 years agoMFC r276004: Fix the indentation to simplify comparing the ARM config files.
ian [Sun, 24 May 2015 14:25:03 +0000 (14:25 +0000)]
MFC r276004: Fix the indentation to simplify comparing the ARM config files.

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

8 years agoMFC r282708:
kib [Sun, 24 May 2015 07:32:02 +0000 (07:32 +0000)]
MFC r282708:
On exec, single-threading must be enforced before arguments space is
allocated from exec_map.

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

8 years agoMFC: r283278
arybchik [Sun, 24 May 2015 06:53:10 +0000 (06:53 +0000)]
MFC: r283278

sfxge: relax assertion to allow RST flag in TSO packets

Kernel under stress load, mixed MC reboot and sfupdate really
generates TSO packet with RST flag.
It will generate many TCP packets with RST flag set.
May be RST flag should be set in the last segment only, but it could be
dropped. So, it is safer to keep the flag in all packets to be sure that
connection is reset.

Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r279554:
trasz [Sun, 24 May 2015 04:14:09 +0000 (04:14 +0000)]
MFC r279554:

Make periphdriver_register() take XPT lock when modifying the periph_drivers
array.

This fixes a panic that sometimes occured when kldloading ctl.ko.

PR: 200384
Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r283252:
gjb [Sun, 24 May 2015 02:15:18 +0000 (02:15 +0000)]
MFC r283252:
  Include the TARGET in the EC2 AMI name.

  Without this, AWS rejects subsequent image uploads of a different
  architecture because the name conflicts.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r283093:
pkelsey [Sun, 24 May 2015 01:52:22 +0000 (01:52 +0000)]
MFC r283093:

Added description of POSIX-specified behavior when invoked on a key from within that key's destructor.

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

8 years agoMFC r282978:
pkelsey [Sun, 24 May 2015 01:48:33 +0000 (01:48 +0000)]
MFC r282978:

When a netmap process terminates without the full set of buffers it
was granted via rings and ni_bufs_list_head represented in those rings
and lists (e.g., via SIGKILL), those buffers are no longer available
for subsequent users for the lifetime of the system. To mitigate this
resource leak, reset the allocator state when the last ref to that
allocator is released.

Note that this only recovers leaked resources for an allocator when
there are no longer any users of that allocator, so there remain
circumstances in which leaked allocator resources may not ever be
recovered - consider a set of multiple netmap processes that are all
using the same allocator (say, the global allocator) where members of
that set may be killed and restarted over time but at any given point
there is one member of that set running.

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

8 years agoMFC r280221:
ian [Sun, 24 May 2015 01:09:51 +0000 (01:09 +0000)]
MFC r280221:

  Update ucom(4) with information about the new PPS capture abilities.

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

8 years agoMFC r279728, r279729, r279756, r279773, r282424, r281367:
ian [Sun, 24 May 2015 00:53:43 +0000 (00:53 +0000)]
MFC r279728, r279729, r279756, r279773, r282424, r281367:

  Add mutex support to the pps_ioctl() API in the kernel.

  Add PPS support to USB serial drivers.

  Use correct mode variable for PPS support.

  Switch polarity of USB serial PPS events.

  The ftdi "get latency" and "get bitmode" device commands are read
  operations, not writes.

  Implement a mechanism for making changes in the kernel<->driver PPS
  interface without breaking ABI or API compatibility with existing drivers.

  Bump version number to indicate the new PPS ABI version changes in the
  pps_state structure.

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

8 years agoMFC r262409, r267129, r267130, r280709:
ian [Sat, 23 May 2015 23:35:19 +0000 (23:35 +0000)]
MFC r262409, r267129, r267130, r280709:

  Move the declaration for mpentry() into a header file

  Fix broken SMP startup on Armada XP after r265694

  Avoid using hard-coded SoC's register address in mptramp code for Armada XP

  Use pmap_mapdev()/unmapdev() to temporarily map on-chip sram while copying
  the startup trampoline code.

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

8 years agoMFC r280278, r280402:
ian [Sat, 23 May 2015 23:27:00 +0000 (23:27 +0000)]
MFC r280278, r280402:

  Allow to override default kernel virtual address assignment on ARM.

  Do not save/restore the TLS pointer on context switch for armv6.

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

8 years agoMFC r279816, r279826:
ian [Sat, 23 May 2015 23:08:54 +0000 (23:08 +0000)]
MFC r279816, r279826:

  Attach the prcm clock driver early, so it can set the mpcore timer frequency.

  Change the name of the dmtimer pps device from /dev/ppsN to /dev/dmtppsN.

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

8 years agoMFC r279810, r279811:
ian [Sat, 23 May 2015 23:05:31 +0000 (23:05 +0000)]
MFC r279810, r279811:

  Clean data cache before instruction cache in armv7_icache_sync_range().

  Add minimum cache line sizes to struct cpuinfo, use them in the new cache
  maintenance routines.  Also add a routine to invalidate the branch cache.

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

8 years agoMFC r278518: Resolve cache line size from CP15 instead of hard-coded 32.
ian [Sat, 23 May 2015 22:48:54 +0000 (22:48 +0000)]
MFC r278518: Resolve cache line size from CP15 instead of hard-coded 32.

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

8 years agoMFC r277098, r279235:
ian [Sat, 23 May 2015 22:36:41 +0000 (22:36 +0000)]
MFC r277098, r279235:

  Introduce ofw_bus_reg_to_rl() to replace part of common bus code

  Fix endianness on FDT read in ARM GIC

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

8 years agoMFC r274711:
ian [Sat, 23 May 2015 22:34:25 +0000 (22:34 +0000)]
MFC r274711:

 Stop using early_putc immediately after configuring console with cninit()

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

8 years agoMFC r274249, r274484, r275583:
ian [Sat, 23 May 2015 22:33:06 +0000 (22:33 +0000)]
MFC r274249, r274484, r275583:

  Avoid panic in ofwbus caused by not released resource list entry

  Fix typo in ARM GIC device_printf()

  Fix buffer overflow in Marvell PCI/PCIe driver

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