197200 Commits

Author SHA1 Message Date
dumbbell
6981999a42 vt(4): Save/restore keyboard mode & LED states when switching window
(MFC of r272416)

Add new functions to manipulate these mode & state, instead of calling
kbdd_ioctl() everyhere.

This fixes at least two bugs:

    1. The state of the Scroll Lock LED and the state of scroll mode
       could be out-of-sync. For instance, if one enables scroll mode on
       window #1 and switches to window #2, the LED would remain on, but
       the window wouldn't be in scroll mode.

       Similarily, when switching between a console and an X.Org
       session, the LED states could be inconsistent with the real
       state.

    2. When exiting from an X.Org session, the user could be unable to
       type anything. The workaround was to switch to another console
       window and come back.

Differential Revision:	https://reviews.freebsd.org/D821
Reviewed by:	ray@
Approved by:	ray@
Tested by:	kwm@
2014-10-13 13:50:51 +00:00
tuexen
ed67dea7a4 MFC r272841:
Ensure that the flags field of sctp_tmit_chunks is initialized.
Thanks to Peter Bostroem from Google for reporting the issue.
2014-10-12 17:45:22 +00:00
tuexen
b0912548c1 MFC r272751:
Ensure that the list of streams sent in a stream reset parameter fits
in an mbuf-cluster.
Thanks to Peter Bostroem for drawing my attention to this part of the code.
2014-10-12 17:42:32 +00:00
tuexen
85569fa02c MFC r272750:
Ensure that the number of stream reported in srs_number_streams is
consistent with the amount of data provided in the SCTP_RESET_STREAMS
socket option.
Thanks to Peter Bostroem from Google for drawing my attention to
this part of the code.
2014-10-12 17:39:37 +00:00
tuexen
4f377875d1 MFC r272571:
Remove unused MC_ALIGN macro as suggested by Robert.
2014-10-12 17:36:41 +00:00
cy
b41a810b86 MFC r272555
ipfilter bug #537 NAT rules with sticky have incorrect hostmap IP address.
This fixes when an IP address mapping is put in the hostmap table for
sticky NAT rules, it ends up having the wrong byte order.

Obtained from:	ipfilter CVS repo (r1.102), NetBSD CVS repo (r1.12)
2014-10-12 17:21:15 +00:00
cy
a223c6d9ec MFC r272554
ipfilter bug #534 destination list hashing not endian neutral

Obtained from:	ipfilter CVS repo (r1.26), NetBSD CVS repo (r1.8)
2014-10-12 17:19:11 +00:00
cy
159eb60806 MFC r272553
ipfilter bug #538 ipf_p_dns_del should return void

Obtained from:	ipfilter cvs repo (r1.8)
2014-10-12 17:17:19 +00:00
cy
647905f29a MFC r272552
ipfilter bug #554 Determining why a ipf rule matches is hard -- replace
ipfilter rule compare with new ipf_rule_compare() function.

Obtained from:	ipfilter CVS rep (r1.129)
2014-10-12 17:15:20 +00:00
cy
fea983df78 MFC r272551
ipfiler bug #550 filter rule list corrupted with inserted rules

Obtained from:	ipfilter CVS repo (r1.128); NetBSD CVS repo (r1.15)
2014-10-12 17:13:14 +00:00
cy
d487341bd7 MFC r272052
ipfilter bug #558 add in some missing frag table function comments.

Obtained from:	ipfilter CVS repo (r1.36)
2014-10-12 17:10:44 +00:00
cy
c5a5359e13 MFC r271980
Check for NULL before de-refencing; in particular sel is assigned to NULL,
in the default case, and then couple of lines down we do sel->

Obtained from:	NetBSD CVS repo (r1.5)
2014-10-12 17:08:44 +00:00
cy
2e9b5f450d MFC r271978
ipfilter bug #552 destination port not zero after parsing nat rule.

Obtained from:	netbsd CVS repo (r1.4), ipfilter CVS repo (r1.38)
2014-10-12 17:03:47 +00:00
cy
23579b38ee MFC r271977
3561691 gethost never returns an ipv6 address

Obtained from:	ipfilter CVS repo (r1.34), netbsd CVS repo (r1.4)
2014-10-12 16:58:45 +00:00
cy
60a2447c51 MFC r271974
ipfilter bug #551 ipf.conf address structure not properly zero filled.

Obtained from:	ipfilter CVS repo (r1.37), netbsd CVS repo (r1.3)
2014-10-12 16:55:26 +00:00
cy
ba88b262c3 MFC r271972
Fix ipfilter bug #536 ipnat can try to print rule as dstlist incorrectly.

Obtained from:	ipfilter CVS repo (r1.14), netbsd CVS repo (r1.3)
2014-10-12 16:51:02 +00:00
cy
e95de0dcc5 MFC r271971
Fix ipfilter bug #553 gethost needs to zero entire IP address structure.

Obtained from:	ipfilter CVS repo (r1.11)
2014-10-12 16:48:22 +00:00
cy
40f9831d42 MFC r271970
ipv6 address for test.hosts.dots in wrong byte order.

Obtained from:	ipfilter CVS repo (r1.11), netbsd CVS repo (r1.5)
2014-10-12 16:46:03 +00:00
mav
a45382b275 Use proper variable when looping through periphs with CAM_PERIPH_FREE.
PR:		194256
Submitted by:	Scott M. Ferris <smferris@gmail.com>
Sponsored by:	EMC/Isilon Storage Division
2014-10-12 06:14:50 +00:00
rodrigc
538d05fbcc Merge: r269884
Complete the usr.bin/yacc kyua integration work I originally
submitted via r268811

- Install the Kyuafile by adding FILES to FILESGROUPS
- Run the testcases with an unprivileged user

  Some of the testcases depend upon behavior that's broken when
  run as root on FreeBSD because of how permissions are treated
  with access(2) vs eaccess(2), open(2), etc

- Simplify the test driver to just inspect the exit code from
  run_test because it now exits with 0 if successful and exits
  with !0 if unsuccessful
- Don't do ad hoc temporary directory creation/deletion; let Kyua
  handle that
- Add entries for files removed in r268811 to
  OptionalObsoleteFiles.inc

PR: 191020
X-MFC with: r268811
Approved by: jmmv (mentor)
Reviewed by: bapt
Sponsored by: EMC / Isilon Storage Division
2014-10-11 23:31:44 +00:00
rodrigc
094ca4bfbc Merge: r258931
Add missing bits from the vendor's 2005-05-04 change to
contrib/byacc/makefile.in ("add YYPATCH here so it can be tested by
applications") so that applications have a hope of detecting newer
FreeBSD YACC output from an older one.

Submitted by: Juniper Networks
2014-10-11 23:02:03 +00:00
adrian
7f559d779a MFC r271784 - Fix the handling of EOP in status descriptors for if_igb(4)
and don't double-free mbufs.

Like ixgbe(4) chipsets, EOP is only set on the final descriptor
in a chain of descriptors.  So, to free the whole list of descriptors,
we should free the current slot _and_ the assembled list of descriptors
that make up the fragment list.

The existing code was setting discard once it saw EOP + an error status;
it then freed all the subsequent descriptors until the next EOP. That's
totally the wrong order.
2014-10-11 22:13:24 +00:00
adrian
5995ee9a98 MFC r271645 - Set DROP_EN on each RX queue if transmit flow-control is disabled.
This allows the NIC to drop frames on the receive queue and not
cause the MAC to block on receiving to _any_ queue.

Tested:

igb0@pci0:5:0:0:        class=0x020000 card=0x152115d9 chip=0x15218086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'I350 Gigabit Network Connection'
    class      = network
    subclass   = ethernet

Discussed with: Eric Joyner <eric.joyner@intel.com>
MFC after:    1 week
Sponsored by: Norse Corp, Inc.
2014-10-11 22:12:24 +00:00
adrian
d090f32bd0 MFC r271649 - Disable flow-director support until it's been debugged
and verified.

The flowdirector feature shares on-chip memory with other things
such as the RX buffers.  In theory it should be configured in a way
that doesn't interfere with the rest of operation.  In practice,
the RX buffer calculation didn't take the flow-director allocation
into account and there'd be overlap.  This lead to various garbage
frames being received containing what looks like internal NIC state.

What _I_ saw was traffic ending up in the wrong RX queues.
If I was doing a UDP traffic test with only one NIC ring receiving
traffic, everything is fine.  If I fired up a second UDP stream
which came in on another ring, there'd be a few percent of traffic
from both rings ending up in the wrong ring.  Ie, the RSS hash would
indicate it was supposed to come in ring X, but it'd come in ring Y.

However, when the allocation was fixed up, the developers at Verisign
still saw traffic stalls.

The flowdirector feature ends up fiddling with the NIC to do various
attempts at load balancing connections by populating flow table rules
based on sampled traffic.  It's likely that all of that has to be
carefully reviewed and made less "magic".

So for now the flow director feature is disabled (which fixes both
what I was seeing and what they were seeing) until it's all much
more debugged and verified.

Tested:

* (me) 82599EB 2x10G NIC, RSS UDP testing.
* (verisign) not sure on the NIC (but likely 82599), 100k-200k/sec TCP
  transaction tests.

Submitted by: Marc De La Gueronniere <mdelagueronniere@verisign.com>
Sponsored by: Verisign, Inc.
2014-10-11 22:10:39 +00:00
adrian
d927fae9b7 MFC r271648 - The error bits are not valid with EOP=0; so intermediary
fragments should not be discarded.

Submitted by: Marc De La Gueronniere <mdelagueronniere@verisign.com>
Sponsored by: Verisign, Inc.
2014-10-11 22:09:46 +00:00
adrian
8128ee7851 Merge r271647 - Fix a double-free of mbufs in rx_ixgbe_discard().
fmp->buf at the free point is already part of the chain being freed,
  so double-freeing is counter-productive.

Submitted by:	Marc De La Gueronniere <mdelagueronniere@verisign.com>
Sponsored by:	Verisign, Inc.
2014-10-11 22:08:53 +00:00
rodrigc
f2976cb6be Merge: r268812
Add the mtree entry for yacc tests
2014-10-11 21:54:23 +00:00
hrs
72b3bc6083 MFC r272885:
Do not add late flag when file= is specified because it has a bad
  side-effect.  The specified file should exist before the fstab line.
2014-10-11 20:35:36 +00:00
rodrigc
b9241c62af Merge: r272769
Import byacc 20141006

PR: 193499
2014-10-11 19:38:29 +00:00
rodrigc
a4222aadd6 Merge: 272655
Import byacc 20141005 from vendor
2014-10-11 19:34:41 +00:00
rodrigc
e054537bc7 Merge: r272649
use calloc in get_line() when allocating line to ensure it is fully initialized,
 fixes a later uninitialized value in copy_param() (FreeBSD #193499).

PR: 193499
Submitted by: Thomas E. Dickey  <tom@invisible-island.net>
2014-10-11 19:28:22 +00:00
rodrigc
6fdcea3e5e Merge: r268811
Update to byacc 20140715

PR:             191020
Submitted by:   gcooper (yaneurabeya@gmail.com)
2014-10-11 19:18:00 +00:00
kib
82d8b580fd MFC r272538:
Slightly reword comment.  Move code, which is described by the
comment, after it.
2014-10-11 18:01:09 +00:00
kib
149982a012 MFC r272536:
Add kernel option KSTACK_USAGE_PROF.
2014-10-11 17:49:51 +00:00
gjb
d9503cbf77 Switch stable/10 back to -PRERELEASE now that releng/10.1 is
branched.

Sponsored by:	The FreeBSD Foundation
2014-10-11 16:16:05 +00:00
ae
cd29b4a4d0 MFC r272487:
Add UUID of FreeBSD slice to GPT scheme.
2014-10-11 06:04:44 +00:00
emaste
31f18a365b MFC r272762: Correct scale factor for T terabyte suffix
PR:		194250
2014-10-11 00:30:57 +00:00
pfg
e384592b57 MFC r271879:
awk: Use random(3) instead of rand(3)

While none of them is considered even near to cryptographic
level, random(3) is a better random generator than rand(3).

Use random(3) for awk as is done in other systems.

PR:		193147
2014-10-10 23:18:44 +00:00
jhb
5595ee4003 MFC 270828,271487,271495:
Add sysctls to export the BIOS SMAP and EFI memory maps along with
handlers in the sysctl(8) binary to format them.
2014-10-10 20:47:23 +00:00
bz
42c3399b29 MFC r272713:
Since introducing the extra mapping in r250103 (head) for architectural performance
 events we have actually counted 'Branch Instruction Retired' when people
 asked for 'Unhalted core cycles' using the 'unhalted-core-cycles' event mask
 mnemonic.

 Reviewed by:		jimharris
 Discussed with:	gnn, rwatson
Sponsored by:		DARPA/AFRL
2014-10-10 12:02:34 +00:00
smh
4347b3c38b MFC r272474:
Fix various issues with zvols

Sponsored by:	Multiplay
2014-10-10 01:01:04 +00:00
smh
303356caa9 MFC r271589:
Added missing ZFS sysctls

This also includes small additional direct changes as it still uses the old
way of handling tunables.

Sponsored by:	Multiplay
2014-10-10 00:51:23 +00:00
smh
b231fd93a0 MFC r271754:
Remove unused ZFS ARC functions

Sponsored by:	Multiplay
2014-10-10 00:28:19 +00:00
smh
7e6d3acc4d MFC r271802:
Add dtrace probe support for zfs SET_ERROR(..)

MFC r271873:
Fix static kernel build with options ZFS

MFC r271819:
Remove sys/types.h include as per style (9)

Sponsored by:	Multiplay
2014-10-10 00:26:00 +00:00
smh
227e064147 MFC r270759:
Refactor ZFS ARC reclaim logic to be more VM cooperative

MFC r270861:
Ensure that ZFS ARC free memory checks include cached pages

MFC r272483:
Refactor ZFS ARC reclaim checks and limits

Sponsored by:	Multiplay
2014-10-10 00:12:16 +00:00
hrs
e926a5c769 MFC r272393:
Resurrect set_rcvar() as a function to define a rc.conf variable.
  It defines a variable and its default value in load_rc_config() just after
  rc.conf is loaded.  "rcvar" command shows the current and the default values.
2014-10-09 23:52:33 +00:00
hrs
295bc031b8 MFC r271921:
Fix a typo.
2014-10-09 23:50:31 +00:00
hrs
33c910e72d MFC r271919:
Fix a bug which could make routed(8) daemon exit by sending a special RIP
  query from a remote machine, and disable accepting it by default.  This
  requests a routed(8) daemon to dump routing information base for debugging
  purpose.  An -i flag to enable it has been added.
2014-10-09 23:49:36 +00:00
hrs
c1d2c479c7 MFC r271909:
Revert changes in r269180.  It could cause -c N option to enter an
  infinite loop if no reply packet is received.
2014-10-09 23:48:20 +00:00
hrs
159d6219db MFC r271663:
Fix a typo; master server for iprop service should be singular.
2014-10-09 23:47:07 +00:00