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.
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.
ian [Sat, 23 May 2015 20:54:25 +0000 (20:54 +0000)]
MFC r279723, r279724:
Define new linker set, UART_FDT_CLASS_AND_DEVICE, for registering full
(class and device) FDT UART. Define second one, UART_FDT_CLASS, for UART
class only.
Move the uart_class definitions and fdt compat data into the individual
uart implementations, and export them using the new linker-set mechanism.
ian [Sat, 23 May 2015 20:53:19 +0000 (20:53 +0000)]
MFC r268137, r268138:
Define a "__weak" macro for declaring symbols "weak".
Add support for empty data sets. Data set begin and end pointers
should resolve to "NULL" when not present. This is done by declaring
the data set begin and end symbols as "weak".
ian [Sat, 23 May 2015 17:30:30 +0000 (17:30 +0000)]
MFC r278770, r279114, r279215, r279338, r279543:
Add logic for handling new-style ARM cpu ID info.
Correct a comment which was exactly backwards from reality.
There is no reason to do i+dcache writeback and invalidate when changing
the translation table (this may be left over from armv5 days). It's
especially bad to do so using a cache operation that isn't coherent on
SMP systems.
Add casting to make atomic ops work for pointers. (Apparently nobody has
ever done atomic ops on pointers before now on arm).
jhb [Fri, 22 May 2015 21:51:36 +0000 (21:51 +0000)]
MFC 266852,270223:
- Fix pf(4) to build with MAXCPU set to 256. MAXCPU is actually a count,
not a maximum ID value (so it is a cap on mp_ncpus, not mp_maxid).
- Bump MAXCPU on amd64 from 64 to 256. In practice APIC only permits 255
CPUs (IDs 0 through 254). Getting above that limit requires x2APIC.
whu [Fri, 22 May 2015 09:03:55 +0000 (09:03 +0000)]
MFC r282212:
Microsoft vmbus, storage and other related driver enhancements for HyperV.
- Vmbus multi channel support.
- Vector interrupt support.
- Signal optimization.
- Storvsc driver performance improvement.
- Scatter and gather support for storvsc driver.
- Minor bug fix for KVP driver.
Thanks royger, jhb and delphij from FreeBSD community for the reviews
and comments. Also thanks Hovy Xu from NetApp for the contributions to
the storvsc driver.
kib [Fri, 22 May 2015 08:11:31 +0000 (08:11 +0000)]
MFC r282944:
Decrement p_boundary_count in the single-threading thread, during making
other thread runnable. This guarantees that upon return from the
thread_single_end(), p_boundary_count is zero.
pfg [Thu, 21 May 2015 20:39:39 +0000 (20:39 +0000)]
MFC r282863:
Adjust visibility macros.
The GCC visibility attributes were introduced in GCC 4.0.
Apparently the "protected" attribute was introduced only
until GCC 4.2, but we are not currently using it.
delphij [Thu, 21 May 2015 18:59:11 +0000 (18:59 +0000)]
MFC r282608:
date(1): Make -r behave like GNU's version when the option can not be
interpreted as a number, which checks the file's modification time and
use that as the date/time value.
This improves compatibility with GNU coreutils's version of date(1).
trasz [Thu, 21 May 2015 13:08:30 +0000 (13:08 +0000)]
MFC r275681:
Add "-media" autofs map, to access data on removable media, such as CD
drives or flash keys. It can be enabled by uncommenting a single entry
in default /etc/auto_master. It can also be easily modified to use
fuse-based filesystems instead of in-kernel ones.
There is still one deficiency - the mountpoints are permanent, they
don't disappear when user removes the media. Fixing it needs some
autofs changes.
Relnotes: yes
Sponsored by: The FreeBSD Foundation
arybchik [Thu, 21 May 2015 09:21:05 +0000 (09:21 +0000)]
MFC: r283048
sfxge: fix overflow queue freeze
If TxQ lock is obtained, deferred packet list shold be serviced even if
the packet addition fails because of overflow.
Without the patch freeze happens if:
- queue is not blocked (i.e. completion does not trigger unblock and service)
- put-list overflow (1024 entries)
- sfxge_tx_packet_add() acquires TxQ lock just as it is released it in
sfxge_tx_qdpl_service() on the second CPU but before pending check
- sfxge_tx_packet_add() swizzles put-list to get-list, fails because of
non-tcp get-list overflow and returns without packet list service
- sfxge_tx_qdpl_service() on the second CPU checks that there are no
pending packets in the put-list and returns
Other possible solution is to guaranee that maximum length of the put-list
is less than maximum length of any get-list.
arybchik [Thu, 21 May 2015 09:15:19 +0000 (09:15 +0000)]
MFC: r283007
sfxge: avoid usage of ifm_data
The driver uses ifm_data to save capabilities mask calculated during
initialization when supported phy modes are discovered.
The patch simply calculates it when either media or options are changed.
arybchik [Thu, 21 May 2015 09:06:41 +0000 (09:06 +0000)]
MFC: r282941
sfxge: do not change CSUM_TSO when IFCAP_TSOx is changed
It is simply not required since the kernel checks corresponding
IFCAP_TSOx capability and CSUM_TSO in hw-assisted offloads.
Note that CSUM_TSO is two bits (CSUM_IP_TSO|CSUM_IP6_TSO) and both bits
are set in IPv4 and IPv6 mbufs.
ae [Thu, 21 May 2015 08:28:35 +0000 (08:28 +0000)]
MFC r282594:
m_dup() is supposed to give a writable copy of an mbuf chain. It uses
m_dup_pkthdr(), that uses M_COPYFLAGS mask to copy m_flags field.
If original mbuf chain has M_RDONLY flag, its copy also will have it.
Reset this flag explicitly.
hselasky [Thu, 21 May 2015 07:48:06 +0000 (07:48 +0000)]
MFC r282017:
Allow DSP basename cloning to be disabled or enabled at boot and
runtime. This is useful when implementing OSS sound stacks in
userspace via libcuse for example.
hselasky [Thu, 21 May 2015 07:34:08 +0000 (07:34 +0000)]
MFC r282645, r282646 and r282730:
* Prevent switching to NULL or own window in the "vt_proc_window_switch"
function. This fixes an issue where X11 keyboard input can appear
stuck. The cause of the problem is a duplicate TTY device window
switch IOCTL during boot, which leaves the "vt_switch_timer" running,
because the current window is already selected. While at it factor out
some NULL checks.
* The "SYSCTL_INT()" default value is only used for read only SYSCTLs
and is not applicable unless the integer pointer is NULL. Set it to
zero to avoid confusion. While at it remove extra semicolon at the end
of the "VT_SYSCTL_INT()" macro.
* Ensure the result from signed subtraction under modulus does not
become negative.
hselasky [Thu, 21 May 2015 06:56:35 +0000 (06:56 +0000)]
MFC r282817:
Apply proper locking when iterating the multicast addresses and add a
missing check for NULL from a non-blocking "kzalloc()" function call.
hselasky [Thu, 21 May 2015 06:30:44 +0000 (06:30 +0000)]
MFC r280495:
Implement a simple OID number garbage collector. Given the increasing
number of dynamically created and destroyed SYSCTLs during runtime it
is very likely that the current new OID number limit of 0x7fffffff can
be reached. Especially if dynamic OID creation and destruction results
from automatic tests. Additional changes:
- Optimize the typical use case by decrementing the next automatic OID
sequence number instead of incrementing it. This saves searching time
when inserting new OIDs into a fresh parent OID node.
- Add simple check for duplicate non-automatic OID numbers.
emaste [Thu, 21 May 2015 01:47:12 +0000 (01:47 +0000)]
MFC INDEX.keymaps fixes
r282898: Correct UTF-8 encoding in Británico
One á was ISO 8859-1 0xE1 instead of UTF-8 0xC3 0xA1.
r282902: Correct language code -- "Danish" is English
The menu entry "Danish ISO-8859-1 (macbook)" was first added to the
syscons(4) INDEX.keymaps in r241851 with no language code, and then in
r256367 incorrectly tagged with "da". It is a Danish keyboard map, but
the description is in English and therefore must be "en".
This error subsequently propagated into the vt(4) INDEX.keymaps.
r282905: Restore 'he' language code for Hebrew kbdmap(1) menu title
r282914: kbdmap(1): Correct menu title: keyboards have a layout, not a language
gjb [Wed, 20 May 2015 19:32:57 +0000 (19:32 +0000)]
MFC r282500, r282693:
r282500:
Add initial support for building RPI2 images.
In release.sh, allow overriding buildenv_setup() before
the handoff to arm/release.sh.
Copy arm/RPI-B.conf -> arm/RPI2.conf, set UBOOT_PORT and
the correct KERNEL, and add the buildenv_setup() override
to install the sysutils/u-boot-rpi2 port/package.
Copy tools/arm/crochet-RPI-B.conf -> tools/arm/crochet-RPI2.conf,
and set the correct entries for the RaspberryPi2 board.
r282693:
Merge ^/projects/release-arm-redux into ^/head.
Of note:
- This commit adds native FreeBSD/arm release build support without
requiring out-of-tree utilities.
- Part of this merge removes the WANDBOARD-{SOLO,DUAL,QUAD} kernel
configuration files, for which the IMX6 kernel configuration file
should be used instead.
- The resulting images have a 'freebsd' user (password 'freebsd'),
to allow ssh(1) access when console access is not available (VGA
or serial). The default 'root' user password is set to 'root'.
- The /etc/ttys file for arm images now enable both ttyv0 and ttyu0
by default.
Note: The RPI2 kernel configuration does not yet exist in stable/10,
however the merge conflicts needed to be properly resolved.
Additionally, SRCBRANCH has been set to base/stable/10 in the updated
arm configuration files as part of this commit.
delphij [Tue, 19 May 2015 08:00:39 +0000 (08:00 +0000)]
MFC r279819:
Fix CARP when in use in a HyperV environment:
- Bump link state when stopping or starting the interface;
- Don't handle SIOCGIFADDR specially, similar to r277103.
This change is based on a previous revision from Andy Zhang
(Microsoft) who did the diagnostic work and many thanks to
them for their help in supporting the HyperV work.
edwin [Mon, 18 May 2015 21:07:44 +0000 (21:07 +0000)]
MFC of 283079,tzdata10:
Update to tzdata2015d:
Release 2015d - 2015-04-24 08:09:46 -0700
Changes affecting future time stamps
Egypt will not observe DST in 2015 and will consider canceling it
permanently. For now, assume no DST indefinitely.
(Thanks to Ahmed Nazmy and Tim Parenti.)
Change affecting past and future time zone abbreviations
The abbreviations for Hawaii-Aleutian standard and daylight times
have been changed from HAST/HADT to HST/HDT, as per US Government
Printing Office style. This affects only America/Adak since 1983,
as America/Honolulu was already using the new style.