]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoAdd example devd configuration file for USB printers.
hselasky [Thu, 9 Oct 2014 13:58:19 +0000 (13:58 +0000)]
Add example devd configuration file for USB printers.

9 years agoOnly catch the line from the compiler output where 'version' is a word
bapt [Thu, 9 Oct 2014 12:35:17 +0000 (12:35 +0000)]
Only catch the line from the compiler output  where 'version' is a word
This allows to build the kernel with gcc 4.9.1 from ports

9 years agoFix typo
bapt [Thu, 9 Oct 2014 12:20:00 +0000 (12:20 +0000)]
Fix typo

9 years agoAdd OBJCOPY to the list of external tools
bapt [Thu, 9 Oct 2014 10:47:14 +0000 (10:47 +0000)]
Add OBJCOPY to the list of external tools

9 years agoFix build when XCC is defined and X_COMPILER_TYPE is not
bapt [Thu, 9 Oct 2014 09:46:44 +0000 (09:46 +0000)]
Fix build when XCC is defined and X_COMPILER_TYPE is not

9 years agoMake iSCSI connection close somewhat less aggressive.
mav [Thu, 9 Oct 2014 09:12:08 +0000 (09:12 +0000)]
Make iSCSI connection close somewhat less aggressive.

It allows to push out some final data from the send queue to the socket
before its close.  In particular, it increases chances for logout response
to be delivered to the initiator.

9 years agoAdd CROSS_TOOLCHAIN macro select pre seeded external toolchain configuration files
bapt [Thu, 9 Oct 2014 09:04:01 +0000 (09:04 +0000)]
Add CROSS_TOOLCHAIN macro select pre seeded external toolchain configuration files
The goal is to provide pre seeded toolchain configurations withing the ports tree
to allow the use of an external toolchain in a simple way:

make CROSS_TOOLCHAIN=powerpc64-gcc TARGET=powerpc TARGET_ARCH=powerpc64 buildworld

This will look for the external toolchain definition in /usr/local/share/mk/powerpc64-gcc.mk
While here add the notion of X_COMPILER_TYPE to the external toolchain framework to allow
to deal with differences between gcc and clang in regards of cross building

9 years agoMFV r272804:
delphij [Thu, 9 Oct 2014 07:52:51 +0000 (07:52 +0000)]
MFV r272804:

Refactor the code and stop restore_object from creating two transactions.

Illumos issue:
    3693 restore_object uses at least two transactions to restore an object

MFC after: 2 weeks

9 years agoMFV r272803:
delphij [Thu, 9 Oct 2014 07:18:40 +0000 (07:18 +0000)]
MFV r272803:

Illumos issue:
    5175 implement dmu_read_uio_dbuf() to improve cached read performance

MFC after: 2 weeks

9 years agoFix build with rpcgen using a recent (tested with gcc 4.9.1) GNU cpp
bapt [Thu, 9 Oct 2014 06:58:33 +0000 (06:58 +0000)]
Fix build with rpcgen using a recent (tested with gcc 4.9.1) GNU cpp

9 years agoRefine support for disabling USB enumeration to allow device detach
hselasky [Thu, 9 Oct 2014 06:24:06 +0000 (06:24 +0000)]
Refine support for disabling USB enumeration to allow device detach
and suspend and resume of existing devices.

MFC after: 2 weeks

9 years agoMFV r272802:
delphij [Thu, 9 Oct 2014 06:02:53 +0000 (06:02 +0000)]
MFV r272802:

 - Limit ARC for zdb at 256MB.  zdb do not typically revisit data
   in the ARC.
 - Increase default max_inflight from 200 to 1000 (can be overriden
   by -I) so we can queue more I/Os when doing scrubbing.
 - Print status while loading meataslabs for leak detection.

Illumos issues:

    5169 zdb should limit its ARC size
    5170 zdb -c should create more scrub i/os by default
    5171 zdb should print status while loading metaslabs for leak detection

MFC after: 2 weeks

9 years agoUse proper variable when looping through periphs with CAM_PERIPH_FREE.
mav [Thu, 9 Oct 2014 05:53:58 +0000 (05:53 +0000)]
Use proper variable when looping through periphs with CAM_PERIPH_FREE.

PR: 194256
Submitted by: Scott M. Ferris <smferris@gmail.com>
MFC after: 3 days
Sponsored by: EMC/Isilon Storage Division

9 years agoMove the calls to u_tun_func() into udp6_append()
bryanv [Thu, 9 Oct 2014 05:42:07 +0000 (05:42 +0000)]
Move the calls to u_tun_func() into udp6_append()

A similar cleanup for UDPv4 was performed in r220620.

Phabricator: https://reviews.freebsd.org/D383
Reviewed by: gnn
MFC after: 1 month

9 years agoMissing from previous commit - keep the VM domain -> PXM mapping
adrian [Thu, 9 Oct 2014 05:34:28 +0000 (05:34 +0000)]
Missing from previous commit - keep the VM domain -> PXM mapping
array and use it to map PXM -> VM domain when needed.

Differential Revision: D906
Reviewed by: jhb

9 years agoAdd a bus method to fetch the VM domain for the given device/bus.
adrian [Thu, 9 Oct 2014 05:33:25 +0000 (05:33 +0000)]
Add a bus method to fetch the VM domain for the given device/bus.

* Add a bus_if.m method - get_domain() - returning the VM domain or
  ENOENT if the device isn't in a VM domain;
* Add bus methods to print out the domain of the device if appropriate;
* Add code in srat.c to save the PXM -> VM domain mapping that's done and
  expose a function to translate VM domain -> PXM;
* Add ACPI and ACPI PCI methods to check if the bus has a _PXM attribute
  and if so map it to the VM domain;
* (.. yes, this works recursively.)
* Have the pci bus glue print out the device VM domain if present.

Note: this is just the plumbing to start enumerating information -
it doesn't at all modify behaviour.

Differential Revision: D906
Reviewed by: jhb
Sponsored by: Norse Corp

9 years agoCheck for mbuf copy failure when there are multiple multicast sockets
bryanv [Thu, 9 Oct 2014 05:17:47 +0000 (05:17 +0000)]
Check for mbuf copy failure when there are multiple multicast sockets

This partitular case is the only path where the mbuf could be NULL.
udp_append() checked for a NULL mbuf only after invoking the tunneling
callback. Our only in tree tunneling callback - SCTP - assumed a non
NULL mbuf, and it is a bit odd to make the callbacks responsible for
checking this condition.

This also reduces the differences between the IPv4 and IPv6 code.

MFC after: 1 month

9 years agoAdd M_FLOWID to M_COPYFLAGS
bryanv [Thu, 9 Oct 2014 04:40:19 +0000 (04:40 +0000)]
Add M_FLOWID to M_COPYFLAGS

The M_FLOWID flag should be propagated to the new mbuf pkthdr in
m_move_pkthdr() and m_dup_pkthdr(). The new mbuf already got the
existing flowid value, but would be ignored since the flag was
not set.

Phabricator: https://reviews.freebsd.org/D914
Reviewed by: adrian
Obtained from: NetApp
MFC after: 1 week

9 years agoFix draining in ttydev_leave():
marcel [Thu, 9 Oct 2014 02:30:38 +0000 (02:30 +0000)]
Fix draining in ttydev_leave():
1.  ERESTART is not only returned when the revoke count changed. It
    is also returned when a signal is received. While a change in
    the revoke count should be ignored, a signal should not.
2.  Waiting until the output queue is entirely drained can cause a
    hang when the underlying device is stuck or broken.

Have tty_drain() take care of this by telling it when we're leaving.
When leaving, tty_drain() will use a timed wait to address point 2
above and it will check the revoke count to handle point 1 above.
The timeout is set to 1 second, which is arbitrary and long enough
to expect a change in the output queue.

Discussed with: jilles@
Reported by: Yamagi Burmeister <lists@yamagi.org>

9 years agoIntegrate usr.bin/gzip/tests from NetBSD into atf/kyua
ngie [Thu, 9 Oct 2014 02:24:34 +0000 (02:24 +0000)]
Integrate usr.bin/gzip/tests from NetBSD into atf/kyua

Sponsored by: EMC / Isilon Storage Division

9 years agoIntegrate usr.bin/diff/tests from NetBSD into atf/kyua at gnu/usr.bin/diff/tests
ngie [Thu, 9 Oct 2014 02:07:34 +0000 (02:07 +0000)]
Integrate usr.bin/diff/tests from NetBSD into atf/kyua at gnu/usr.bin/diff/tests

Sponsored by: EMC / Isilon Storage Division

9 years agoApply r269126 to tty_timedwait():
marcel [Thu, 9 Oct 2014 01:59:25 +0000 (01:59 +0000)]
Apply r269126 to tty_timedwait():
Don't return ERESTART when the device is gone.

9 years agoProperly NUL-terminate the on-stack buffer for reading /boot.config
marcel [Thu, 9 Oct 2014 01:54:32 +0000 (01:54 +0000)]
Properly NUL-terminate the on-stack buffer for reading /boot.config
or /boot/config. In qemu, on a warm boot, the stack is not all zeroes
and we parse beyond the file's contents.

Obtained from: Juniper Networks, Inc.

9 years agoIntegrate usr.bin/grep/tests from NetBSD into atf/kyua
ngie [Thu, 9 Oct 2014 01:53:23 +0000 (01:53 +0000)]
Integrate usr.bin/grep/tests from NetBSD into atf/kyua

Sponsored by: EMC / Isilon Storage Division

9 years agoIntegrate usr.bin/cut/tests from NetBSD into atf/kyua
ngie [Thu, 9 Oct 2014 01:46:31 +0000 (01:46 +0000)]
Integrate usr.bin/cut/tests from NetBSD into atf/kyua

Sponsored by: EMC / Isilon Storage Division

9 years agoIntegrate bin/sleep/tests from NetBSD into atf/kyua
ngie [Thu, 9 Oct 2014 01:39:07 +0000 (01:39 +0000)]
Integrate bin/sleep/tests from NetBSD into atf/kyua

Sponsored by: EMC / Isilon Storage Division

9 years agoIntegrate usr.bin/dirname/tests from NetBSD into atf/kyua
ngie [Thu, 9 Oct 2014 00:55:04 +0000 (00:55 +0000)]
Integrate usr.bin/dirname/tests from NetBSD into atf/kyua

In collaboration with: pho, sjg
Sponsored by: EMC / Isilon Storage Division

9 years agoIntegrate usr.bin/cmp/tests from NetBSD into atf/kyua
ngie [Thu, 9 Oct 2014 00:50:33 +0000 (00:50 +0000)]
Integrate usr.bin/cmp/tests from NetBSD into atf/kyua

In collaboration with: sjg
Sponsored by: EMC / Isilon Storage Division

9 years agoIntegrate usr.sbin/basename/tests from NetBSD into atf/kyua
ngie [Thu, 9 Oct 2014 00:41:42 +0000 (00:41 +0000)]
Integrate usr.sbin/basename/tests from NetBSD into atf/kyua

In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division

9 years agoSet the autoindent to 4 spaces with vim in BSD.tests.dist
ngie [Thu, 9 Oct 2014 00:37:58 +0000 (00:37 +0000)]
Set the autoindent to 4 spaces with vim in BSD.tests.dist

This will prevent vim users from accidentally checking in buggy mtree files
(mixed tabs/spaces).

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoIntegrate usr.sbin/nmtree/tests from NetBSD into atf/kyua
ngie [Thu, 9 Oct 2014 00:32:33 +0000 (00:32 +0000)]
Integrate usr.sbin/nmtree/tests from NetBSD into atf/kyua

In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division

9 years agoForgot to bump Dd.
jhb [Wed, 8 Oct 2014 21:56:00 +0000 (21:56 +0000)]
Forgot to bump Dd.

Pointy hat to: jhb

9 years agoRewrite timeout(9) to be callout(9)-centric instead. Move the description
jhb [Wed, 8 Oct 2014 21:53:24 +0000 (21:53 +0000)]
Rewrite timeout(9) to be callout(9)-centric instead.  Move the description
of timeout(9) to the end and mark it prominently as deprecated.  Document
somewhat how times are specified for the 'sbt' variants.  Better explain
how using callout_init_*() to associate a lock with a callout resolves
common races.

Differential Revision: https://reviews.freebsd.org/D847
Reviewed by: wblock, bjk
MFC after: 1 week

9 years agoWhen tunneling interface is going to insert mbuf into netisr queue after stripping
ae [Wed, 8 Oct 2014 21:23:34 +0000 (21:23 +0000)]
When tunneling interface is going to insert mbuf into netisr queue after stripping
outer header, consider it as new packet and clear the protocols flags.

This fixes problems when IPSEC traffic goes through various tunnels and router
doesn't send ICMP/ICMPv6 errors.

PR: 174602
Obtained from: Yandex LLC
MFC after: 2 weeks
Sponsored by: Yandex LLC

9 years agoImport byacc 20141006
bapt [Wed, 8 Oct 2014 20:46:38 +0000 (20:46 +0000)]
Import byacc 20141006

9 years agoPass up the error status of minidumpsys() to its callers.
markj [Wed, 8 Oct 2014 20:25:21 +0000 (20:25 +0000)]
Pass up the error status of minidumpsys() to its callers.

PR: 193761
Submitted by: Conrad Meyer <conrad.meyer@isilon.com>
Sponsored by: EMC / Isilon Storage Division

9 years agoRemove one second wait for threads exit from icl_conn_close().
mav [Wed, 8 Oct 2014 19:54:42 +0000 (19:54 +0000)]
Remove one second wait for threads exit from icl_conn_close().

Switch it from polling with pause() to using cv_wait()/cv_signal().

9 years agoIt looks like an entry for the R215 is not required in cdce(4) after all.
gavin [Wed, 8 Oct 2014 19:49:10 +0000 (19:49 +0000)]
It looks like an entry for the R215 is not required in cdce(4) after all.

9 years agoIf we fail to send a signal after rotation, print the pidfile from which
markj [Wed, 8 Oct 2014 17:44:30 +0000 (17:44 +0000)]
If we fail to send a signal after rotation, print the pidfile from which
the corresponding PID was obtained.

PR: 194143
Submitted by: Lyndon Nerenberg <lyndon@orthanc.ca>
MFC after: 1 week

9 years agoCorrect scale factor for T terabyte suffix
emaste [Wed, 8 Oct 2014 17:40:58 +0000 (17:40 +0000)]
Correct scale factor for T terabyte suffix

PR: 194250
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoAdd an argument to the x86 pmap_invalidate_cache_range() to request
kib [Wed, 8 Oct 2014 16:48:03 +0000 (16:48 +0000)]
Add an argument to the x86 pmap_invalidate_cache_range() to request
forced invalidation of the cache range regardless of the presence of
self-snoop feature.  Some recent Intel GPUs in some modes are not
coherent, and dirty lines in CPU cache must be flushed before the
pages are transferred to GPU domain.

Reviewed by: alc (previous version)
Tested by: pho (amd64)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoAdd schedgraph traces for callout handlers. Specifically, a callwheel logs
jhb [Wed, 8 Oct 2014 16:22:59 +0000 (16:22 +0000)]
Add schedgraph traces for callout handlers.  Specifically, a callwheel logs
a running event each time it executes a callout function.  The event
includes the function pointer, argument, and whether or not it was run from
hardware interrupt context.  The callwheel is marked idle when each handler
completes.  This effectively logs the duration of each callout routine in
the graph.

9 years agoProperly report 12Gbps connection rate.
mav [Wed, 8 Oct 2014 16:22:26 +0000 (16:22 +0000)]
Properly report 12Gbps connection rate.

Reviewed by: kadesai, slm
MFC after: 1 week

9 years agoEnsure that the list of streams sent in a stream reset parameter fits
tuexen [Wed, 8 Oct 2014 15:30:59 +0000 (15:30 +0000)]
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.

9 years agoEnsure that the number of stream reported in srs_number_streams is
tuexen [Wed, 8 Oct 2014 15:29:49 +0000 (15:29 +0000)]
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.

9 years agoFix comment.
ae [Wed, 8 Oct 2014 12:33:31 +0000 (12:33 +0000)]
Fix comment.

MFC after: 1 week

9 years agoImplement software (mode page) and hardware (config) write protection.
mav [Wed, 8 Oct 2014 12:24:24 +0000 (12:24 +0000)]
Implement software (mode page) and hardware (config) write protection.

9 years agoRevert r156046. We support setting dumpdev via loader tunable again.
ae [Wed, 8 Oct 2014 12:19:48 +0000 (12:19 +0000)]
Revert r156046. We support setting dumpdev via loader tunable again.
Also change default disk name to ada.

MFC after: 3 weeks

9 years agoAdd an ability to set dumpdev via loader(8) tunable.
ae [Wed, 8 Oct 2014 12:18:16 +0000 (12:18 +0000)]
Add an ability to set dumpdev via loader(8) tunable.

MFC after: 3 weeks

9 years agoNo logical code change in this pathc.
kadesai [Wed, 8 Oct 2014 10:14:37 +0000 (10:14 +0000)]
No logical code change in this pathc.
Only Style 9 changes for mrsas driver.

Reviewed by: ambrisko
MFC after: 2 weeks
Sponsored by: AVAGO Technologies

9 years agoSimplify; no functional changes.
trasz [Wed, 8 Oct 2014 09:44:02 +0000 (09:44 +0000)]
Simplify; no functional changes.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoDriver version upgrade.
kadesai [Wed, 8 Oct 2014 09:39:18 +0000 (09:39 +0000)]
Driver version upgrade.
Bring head mrsas same as internal Phase 6.5.

Reviewed by: ambrisko
MFC after: 2 weeks
Sponsored by: AVAGO Technologies

9 years agoIn the passthru IOCTL path, the mfi command pool was freely accessible N times
kadesai [Wed, 8 Oct 2014 09:37:47 +0000 (09:37 +0000)]
In the passthru IOCTL path, the mfi command pool was freely accessible N times
where as there are limited number(32) of mfi commands in the pool.
The mfi command pool is now restricted to 27 simultaneous accesses by using
a counting semaphore while calling the passthru function.

In the mrsas_cam.c source file there was a same function name mrsas_poll(),
which was same as the mrsas_poll() implemented in the mrsas.c file for the
polling interface.
To clearly distinguish the functionality by usage we have renamed the former
as mrsas_cam_poll().

In the passthru function let's say it has got an mfi command from the pool
but it has failed in one of the DMA function call which will lead to leak
an mfi command because in the ERROR case it directly returns and not freeing up
the occupied mfi command.

Reviewed by: ambrisko
MFC after: 2 weeks
Sponsored by: AVAGO Technologies

9 years agod_poll() callback function is the entry point for poll system call for the application.
kadesai [Wed, 8 Oct 2014 09:35:52 +0000 (09:35 +0000)]
d_poll() callback function is the entry point for poll system call for the application.
It is meant to notify the applications which will be waiting for some
controller events to be occured.

Reviewed by: ambrisko
MFC after: 2 weeks
Sponsored by: AVAGO Technologies

9 years agoExtended MSI-x vectors support for Invader and Fury(12Gb/s HBA).
kadesai [Wed, 8 Oct 2014 09:34:25 +0000 (09:34 +0000)]
Extended MSI-x vectors support for Invader and Fury(12Gb/s HBA).

This Driver will create multiple MSI-x vector depending upon what FW expose.
As of now 12 Gbp/s MR controller (Invader and Fury) expose 96 msix vector.
As of now 6 Gbp/s MR controller (Thunderbolt) expose 16 msix vector.

Reviewed by: ambrisko
MFC after: 2 weeks
Sponsored by: AVAGO Technologies

9 years agoFix the minor svn add issue. $FreeBSD$ expands at the time of
kadesai [Wed, 8 Oct 2014 09:30:35 +0000 (09:30 +0000)]
Fix the minor svn add issue. $FreeBSD$ expands at the time of
snv add, so I have added $FreeBSD$ as comment.

This commit is contininous of last mrsas commit, so that compilation
does not break.

Obtained from: AVAGO Technologies
MFC after: 2 weeks

9 years agoThis is a feature provided to run 32-bit linux binaries on FreeBSD 64bit
kadesai [Wed, 8 Oct 2014 09:19:35 +0000 (09:19 +0000)]
This is a feature provided to run 32-bit linux binaries on FreeBSD 64bit
machine, for which 32bit compatibilty code has been added.
As in linux there is only one device entry that is used to fire IOCTL commands,
a new device entry megaraid_sas_ioctl_node is added for solely this
purpose.

From one dev node i.e mrgaraid_sa_ioctl_node we have to find out the
controller instance in case of multicontroller, for which one management info
structure has been added.

Reviewed by: ambrisko
MFC after: 2 weeks
Sponsored by: AVAGO Technologies

9 years agoAlways wait 'command done' interrupt status bit before proceeding next command.
br [Wed, 8 Oct 2014 08:51:05 +0000 (08:51 +0000)]
Always wait 'command done' interrupt status bit before proceeding next command.

Sponsored by: DARPA, AFRL

9 years agoCurrent MegaRAID firmware and hence the driver only supported 64VDs.
kadesai [Wed, 8 Oct 2014 08:48:18 +0000 (08:48 +0000)]
Current MegaRAID firmware and hence the driver only supported 64VDs.
E.g: If the user wants to create more than 64VD on a controller,
    it is not possible on current firmware/driver.

New feature and requirement to support upto 256VD, firmware/driver/apps need changes.
In addition to that, there must be a backward compatibility of the new driver with the
older firmware and vice versa.

RAID map is the interface between Driver and FW to fetch all required
fields(attributes) for each Virtual Drives.
In the earlier design driver was using the FW copy of RAID map where as
in the new design the Driver will keep the RAID map copy of its own; on which
it will operate for any raid map access in fast path.

Local driver raid map copy will provide ease of access through out the code
and provide generic interface for future FW raid map changes.

For the backward compatibility driver will notify FW that it supports 256VD
to the FW in driver capability field.
Based on the controller properly returned by the FW, the Driver will know
whether it supports 256VD or not and will copy the RAID map accordingly.

At any given time, driver will always have old or new Raid map.

Reviewed by : ambrisko
MFC after : 2 weeks
Sponsored by: AVAGO Technologies

9 years agoAdd support for WRITE ATOMIC (16) command and report SBC-4 compliance.
mav [Wed, 8 Oct 2014 07:48:36 +0000 (07:48 +0000)]
Add support for WRITE ATOMIC (16) command and report SBC-4 compliance.

Atomic writes are only supported for ZVOLs in "dev" mode.  In other cases
atomicity can not be guarantied and so the command is blocked.

9 years agoAdd support for disabling USB enumeration in general or on selected
hselasky [Wed, 8 Oct 2014 07:00:50 +0000 (07:00 +0000)]
Add support for disabling USB enumeration in general or on selected
USB HUBs.

MFC after: 2 weeks

9 years agoOops, fix typo made in r272729.
yongari [Wed, 8 Oct 2014 05:53:04 +0000 (05:53 +0000)]
Oops, fix typo made in r272729.

9 years agoDocument newly added controller AR816x/AR817x.
yongari [Wed, 8 Oct 2014 05:49:10 +0000 (05:49 +0000)]
Document newly added controller AR816x/AR817x.

9 years agoAdd support for QAC AR816x/AR817x Gigabit/Fast Ethernet controllers.
yongari [Wed, 8 Oct 2014 05:47:01 +0000 (05:47 +0000)]
Add support for QAC AR816x/AR817x Gigabit/Fast Ethernet controllers.
These controllers seem to have the same feature of AR813x/AR815x and
improved RSS support(4 TX queues and 8 RX queues).  alc(4) supports
all hardware features except RSS.  I didn't implement RX checksum
offloading for AR816x/AR817x just because I couldn't get
confirmation from the Vendor whether AR816x/AR817x corrected its
predecessor's RX checksum offloading bug on fragmented packets.
This change adds supports for the following controllers.
 o AR8161 PCIe Gigabit Ethernet controller
 o AR8162 PCIe Fast Ethernet controller
 o AR8171 PCIe Gigabit Ethernet controller
 o AR8172 PCIe Fast Ethernet controller
 o Killer E2200 Gigabit Ethernet controller

Tested by: Many
Relnotes: yes
MFC after: 2 weeks
HW donated by: Qualcomm Atheros Communications, Inc.

9 years agoAdd new quirk PCI_QUIRK_MSI_INTX_BUG to pci(4).
yongari [Wed, 8 Oct 2014 05:34:39 +0000 (05:34 +0000)]
Add new quirk PCI_QUIRK_MSI_INTX_BUG to pci(4).
QAC AR816x/E2200 controller has a silicon bug that MSI interrupt
does not assert if PCIM_CMD_INTxDIS bit of command register is set.

Reviewed by: jhb

9 years agodon't reinvent the wheel: rely on basename(3)
eadler [Wed, 8 Oct 2014 05:04:31 +0000 (05:04 +0000)]
don't reinvent the wheel: rely on basename(3)

Reviewed by: nwhitehorn

9 years agoFix a long standing bug in MAC statistics register access. One
yongari [Wed, 8 Oct 2014 01:03:32 +0000 (01:03 +0000)]
Fix a long standing bug in MAC statistics register access.  One
additional register was erroneously added in the MAC register set
such that 7 TX statistics counters were wrong.

9 years agoImplement PLPMTUD blackhole detection (RFC 4821), inspired by code
sbruno [Tue, 7 Oct 2014 21:50:28 +0000 (21:50 +0000)]
Implement PLPMTUD blackhole detection (RFC 4821), inspired by code
from xnu sources.  If we encounter a network where ICMP is blocked
the Needs Frag indicator may not propagate back to us.  Attempt to
downshift the mss once to a preconfigured value.

Default this feature to off for now while we do not have a full PLPMTUD
implementation in our stack.

Adds the following new sysctl's for control:
net.inet.tcp.pmtud_blackhole_detection -- turns on/off this feature
net.inet.tcp.pmtud_blackhole_mss       -- mss to try for ipv4
net.inet.tcp.v6pmtud_blackhole_mss     -- mss to try for ipv6

Adds the following new sysctl's for monitoring:
-- Number of times the code was activated to attempt a mss downshift
net.inet.tcp.pmtud_blackhole_activated
-- Number of times the blackhole mss was used in an attempt to downshift
net.inet.tcp.pmtud_blackhole_min_activated
-- Number of times that we failed to connect after we downshifted the mss
net.inet.tcp.pmtud_blackhole_failed

Phabricator: https://reviews.freebsd.org/D506
Reviewed by: rpaulo bz
MFC after: 2 weeks
Relnotes: yes
Sponsored by: Limelight Networks

9 years agocxgbe/tom: don't leak resources tied to an active open request that
np [Tue, 7 Oct 2014 21:26:22 +0000 (21:26 +0000)]
cxgbe/tom: don't leak resources tied to an active open request that
cannot be sent to the chip because a prerequisite L2 resolution
failed.

Submitted by: Hariprasad at chelsio dot com (original version)
MFC after: 2 weeks.

9 years agoMake kern.nswbuf tunable from loader.
jkim [Tue, 7 Oct 2014 20:13:47 +0000 (20:13 +0000)]
Make kern.nswbuf tunable from loader.

MFC after: 1 week

9 years agoRemove call to access(2) which didn't serve any purpose, and make it more
trasz [Tue, 7 Oct 2014 19:08:02 +0000 (19:08 +0000)]
Remove call to access(2) which didn't serve any purpose, and make it more
tolerant to errors.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoSupport the Vodafone R215 LET USB dongle, which is apparently a rebadged
gavin [Tue, 7 Oct 2014 19:07:50 +0000 (19:07 +0000)]
Support the Vodafone R215 LET USB dongle, which is apparently a rebadged
E5372 with different product IDs.

Interestingly, the standard E5372 IDs (12d1:1506) are currently listed in
u3g.c and are the same as the E3131.  However, the R215/E5372 is an NCM
device and works well with cdce(4) whereas the E3131 isn't.  More work
may be needed to better identify the other device IDs.

MFC after: 1 week

9 years agoAllow vt(4) to disable terminal bell with `sysctl kern.vt.bell_enable=0`,
ray [Tue, 7 Oct 2014 18:47:53 +0000 (18:47 +0000)]
Allow vt(4) to disable terminal bell with `sysctl kern.vt.bell_enable=0`,
similar as syscons(4) do.

Submitted by: Tiwei Bie <btw@mail.ustc.edu.cn>
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

9 years agoSince introducing the extra mapping in r250103 for architectural performance
bz [Tue, 7 Oct 2014 18:00:34 +0000 (18:00 +0000)]
Since introducing the extra mapping in r250103 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
MFC after: 3 days
Sponsored by: DARPA/AFRL

9 years agoAdd driver for Synopsys DesignWare Mobile Storage Host Controller.
br [Tue, 7 Oct 2014 17:39:30 +0000 (17:39 +0000)]
Add driver for Synopsys DesignWare Mobile Storage Host Controller.

Sponsored by: DARPA, AFRL

9 years agoImplement the FLUSH operation in the virtio-block emulation.
neel [Tue, 7 Oct 2014 17:08:53 +0000 (17:08 +0000)]
Implement the FLUSH operation in the virtio-block emulation.

This gets rid of the following error message during FreeBSD guest bootup:
"vtbd0: hard error cmd=flush fsbn 0"

Reported by: rodrigc
Reviewed by: grehan

9 years agol2arc_write_buffers: reduce headroom value
avg [Tue, 7 Oct 2014 16:08:21 +0000 (16:08 +0000)]
l2arc_write_buffers: reduce headroom value

FreeBSD has ARC_BUFC_NUMMETADATALISTS metadata lists and ARC_BUFC_NUMDATALISTS
data lists (currently both are 16) while illumos has just a single list
of each kind.

headroom determines how much data is scanned on a single list
during each run of the l2arc feed thread.
Because FreeBSD has more lists we proportionally decrease the limit.

Reviewed by: Brendan Gregg (earlier version)
MFC after: 2 weeks
Sponsored by: HybridCluster

9 years agorevert r272702: wrong (earlier) change was committed
avg [Tue, 7 Oct 2014 16:06:10 +0000 (16:06 +0000)]
revert r272702: wrong (earlier) change was committed

9 years agoFix a bug introduced in
tuexen [Tue, 7 Oct 2014 16:01:17 +0000 (16:01 +0000)]
Fix a bug introduced in
https://svnweb.freebsd.org/base?view=revision&revision=272347

MFC after: 3 days

9 years agoreduce L2ARC_WRITE_SIZE on FreeBSD
avg [Tue, 7 Oct 2014 14:30:24 +0000 (14:30 +0000)]
reduce L2ARC_WRITE_SIZE on FreeBSD

FreeBSD has ARC_BUFC_NUMMETADATALISTS metadata lists and ARC_BUFC_NUMDATALISTS
data lists (currently both are 16) while illumos has just a single list
of each kind.

L2ARC_WRITE_SIZE determines the default value of l2arc_write_max which
defines limits on how much data is scanned and written to a cache device
during each run of the l2arc feed thread.  The limits are applied on the
per buffer list basis.
Because FreeBSD has more lists we proportionally reduce the limits.

Reviewed by: Brendan Gregg (earlier version)
MFC after: 2 weeks
Sponsored by: HybridCluster

9 years agomake userland __assfail from opensolaris compat honor 'aok' variable
avg [Tue, 7 Oct 2014 14:15:50 +0000 (14:15 +0000)]
make userland __assfail from opensolaris compat honor 'aok' variable

This should allow zdb -A option to actually make difference.

MFC after: 2 weeks

9 years agoOur packet filters use mbuf's rcvif pointer to determine incoming interface.
ae [Tue, 7 Oct 2014 13:31:04 +0000 (13:31 +0000)]
Our packet filters use mbuf's rcvif pointer to determine incoming interface.
Change mbuf's rcvif to enc0 and restore it after pfil processing.

PR: 110959
Sponsored by: Yandex LLC

9 years agoFix compile warning when compiling with GCC.
hselasky [Tue, 7 Oct 2014 10:04:25 +0000 (10:04 +0000)]
Fix compile warning when compiling with GCC.

MFC after: 3 days
Sponsored by: Mellanox Technologies

9 years ago1) Fix the case we have less arguments for format string than we expected.
ache [Tue, 7 Oct 2014 06:34:05 +0000 (06:34 +0000)]
1) Fix the case we have less arguments for format string than we expected.
2) Return error on unsupported format specs.
(both according to POSIX)

PR:     93197

9 years agoBack out timegm error check from r272562.
ache [Tue, 7 Oct 2014 06:02:08 +0000 (06:02 +0000)]
Back out timegm error check from r272562.

POSIX treats negative time_t as undefined (i.e. may be valid too,
depends on system's policy we don't have) and we don't set EOVERFLOW
in mktime/timegm as POSIX requires to surely distinguish -1 return
as valid negative time from -1 as error return.

9 years agoAdd MLINK for explicit_bzero(3) and bump .Dd date.
delphij [Tue, 7 Oct 2014 04:59:11 +0000 (04:59 +0000)]
Add MLINK for explicit_bzero(3) and bump .Dd date.

MFC after: 2 weeks

9 years agoBump __FreeBSD_version for the addition of explicit_bzero(3).
delphij [Tue, 7 Oct 2014 04:54:47 +0000 (04:54 +0000)]
Bump __FreeBSD_version for the addition of explicit_bzero(3).

9 years agoAdd explicit_bzero(3) and its kernel counterpart.
delphij [Tue, 7 Oct 2014 04:54:11 +0000 (04:54 +0000)]
Add explicit_bzero(3) and its kernel counterpart.

Obtained from: OpenBSD
MFC after: 2 weeks

9 years agoTreat D keywords as identifiers in certain postfix expressions. This allows
markj [Mon, 6 Oct 2014 21:52:40 +0000 (21:52 +0000)]
Treat D keywords as identifiers in certain postfix expressions. This allows
one to, for example, access the "provider" field of a struct g_consumer,
even though "provider" is a D keyword.

PR: 169657
MFC after: 2 months
Discussed with: Bryan Cantrill
Sponsored by: EMC / Isilon Storage Division

9 years agoInject #UD into the guest when it executes either 'MONITOR' or 'MWAIT'.
neel [Mon, 6 Oct 2014 20:48:01 +0000 (20:48 +0000)]
Inject #UD into the guest when it executes either 'MONITOR' or 'MWAIT'.

The hypervisor hides the MONITOR/MWAIT capability by unconditionally setting
CPUID.01H:ECX[3] to 0 so the guest should not expect these instructions to
be present anyways.

Discussed with: grehan

9 years agoProperly set the timeout in a query_state. The global query_timeout
jhb [Mon, 6 Oct 2014 18:16:45 +0000 (18:16 +0000)]
Properly set the timeout in a query_state.  The global query_timeout
configuration value is an integer count of seconds, it is not a timeval.
Using memcpy() to copy a timeval from it put garbage into the tv_usec
field.

PR: 194025
Submitted by: David Shane Holden <dpejesh@yahoo.com>
MFC after: 1 week

9 years agoFix build for i386 kernels with out 'I686_CPU'.
jhb [Mon, 6 Oct 2014 18:11:05 +0000 (18:11 +0000)]
Fix build for i386 kernels with out 'I686_CPU'.

PR: 193660
Submitted by: holger@freyther.de

9 years agoAdd netmap support to libpcap. Tcpdump and other native pcap application can now
luigi [Mon, 6 Oct 2014 15:48:28 +0000 (15:48 +0000)]
Add netmap support to libpcap. Tcpdump and other native pcap application can now
run directly on netmap ports using netmap:foo or valeXX:YY device names.
Modifications to existing code are small and trivial, the netmap-specific
code is all in a new file.

Please be aware that in netmap mode the physical interface is disconnected from
the host stack, so libpcap will steal the traffic not just make a copy.

For the full version of the code (including linux and autotools support) see
https://code.google.com/p/netmap-libpcap/

MFC after: 3 days

9 years agoCall initializecpucache() on the BSP for i386 in the !XEN case. This was
jhb [Mon, 6 Oct 2014 15:43:57 +0000 (15:43 +0000)]
Call initializecpucache() on the BSP for i386 in the !XEN case.  This was
my bug in r271409 that I noticed while reviewing r272492.

9 years agoImport byacc 20141005 from vendor
bapt [Mon, 6 Oct 2014 15:12:59 +0000 (15:12 +0000)]
Import byacc 20141005 from vendor

9 years agoFix comment and sort rights by name
luigi [Mon, 6 Oct 2014 15:03:08 +0000 (15:03 +0000)]
Fix comment and sort rights by name

MFC after: 3 days

9 years agoimport byacc 20141005
bapt [Mon, 6 Oct 2014 14:55:38 +0000 (14:55 +0000)]
import byacc 20141005

9 years agoSet CAM_SIM_QUEUED flag before calling ctl_queue() to avoid race.
mav [Mon, 6 Oct 2014 14:52:04 +0000 (14:52 +0000)]
Set CAM_SIM_QUEUED flag before calling ctl_queue() to avoid race.

PR: 194128
Submitted by: Scott M. Ferris <smferris@gmail.com>
MFC after: 3 days
Sponsored by: EMC/Isilon Storage Division

9 years agoMFV:
rodrigc [Mon, 6 Oct 2014 14:43:02 +0000 (14:43 +0000)]
MFV:
 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>

9 years agoImprove r272609 (O_TCPOPTS).
melifaro [Mon, 6 Oct 2014 12:29:06 +0000 (12:29 +0000)]
Improve r272609 (O_TCPOPTS).

MFC after: 3 dayes