]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoMake PL011 UART to wait on putc only when TX FIFO is full
zbb [Wed, 12 Nov 2014 21:38:31 +0000 (21:38 +0000)]
Make PL011 UART to wait on putc only when TX FIFO is full

Instead of waiting for empty TX FIFO it is more reasonable to
block on full FIFO. As soon as FIFO slot is free the character
can be transmitted.
In case of TX FIFO disabled, TXFF bit indicates that transmit
register is not empty.

Obtained from:   Semihalf
Reviewed by:     andrew, emaste
Sponsored by:    The FreeBSD Foundation

9 years agoFix previous change to this file (r273811).
np [Wed, 12 Nov 2014 20:57:29 +0000 (20:57 +0000)]
Fix previous change to this file (r273811).

This has been submitted upstream and should show up there soon.

Submitted by: Hariprasad at Chelsio dot com

9 years agoPull in r221709 from upstream llvm trunk (by Frédéric Riss):
dim [Wed, 12 Nov 2014 20:01:10 +0000 (20:01 +0000)]
Pull in r221709 from upstream llvm trunk (by Frédéric Riss):

  Totally forget deallocated SDNodes in SDDbgInfo.

  What would happen before that commit is that the SDDbgValues associated with
  a deallocated SDNode would be marked Invalidated, but SDDbgInfo would keep
  a map entry keyed by the SDNode pointer pointing to this list of invalidated
  SDDbgNodes. As the memory gets reused, the list might get wrongly associated
  with another new SDNode. As the SDDbgValues are cloned when they are transfered,
  this can lead to an exponential number of SDDbgValues being produced during
  DAGCombine like in http://llvm.org/bugs/show_bug.cgi?id=20893

  Note that the previous behavior wasn't really buggy as the invalidation made
  sure that the SDDbgValues won't be used. This commit can be considered a
  memory optimization and as such is really hard to validate in a unit-test.

This should fix abnormally large memory usage and resulting OOM crashes
when compiling certain ports with debug information.

Reported by: Dmitry Marakasov <amdmi3@amdmi3.ru>
Upstream PRs: http://llvm.org/PR19031 http://llvm.org/PR20893
MFC after: 1 week

9 years agoAdd the FDT table GUID. This is used to pass the device tree blob from UEFI
andrew [Wed, 12 Nov 2014 17:56:38 +0000 (17:56 +0000)]
Add the FDT table GUID. This is used to pass the device tree blob from UEFI
to the loader in a similar way to the ACPI tables.

This will be used on arm64 but is not specific to the architecture.

Sponsored by: The FreeBSD Foundation

9 years agoFor posix_fallocate(2) and posix_fadvise(2), return ESPIPE when
kib [Wed, 12 Nov 2014 17:31:38 +0000 (17:31 +0000)]
For posix_fallocate(2) and posix_fadvise(2), return ESPIPE when
underlying file does not have DFLAG_SEEKABLE set [1].

For posix_fallocate(2), simplify error handling logic.  Do return when
fp is not yet referenced.

Noted by: bde [1]
Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoifdef ext2_print_inode which is not really used.
pfg [Wed, 12 Nov 2014 16:23:56 +0000 (16:23 +0000)]
ifdef ext2_print_inode which is not really used.

ext2_print_inode is not really used but it was nice to
have for initial development work. #ifdef it under a
new EXT2FS_DEBUG knob so that we don't spend time
compiling it.

MFC after: 3 days

9 years agoFix spelling and wording.
des [Wed, 12 Nov 2014 16:07:33 +0000 (16:07 +0000)]
Fix spelling and wording.

9 years agoDecode more fields when dumping USB descriptors.
hselasky [Wed, 12 Nov 2014 14:52:44 +0000 (14:52 +0000)]
Decode more fields when dumping USB descriptors.
- Some minor style changes while at it.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after: 1 week

9 years agoFix ips_out_nosa errors accounting.
ae [Wed, 12 Nov 2014 14:00:49 +0000 (14:00 +0000)]
Fix ips_out_nosa errors accounting.

MFC after: 1 week
Sponsored by: Yandex LLC

9 years agoMerge from projects/sendfile:
glebius [Wed, 12 Nov 2014 10:17:46 +0000 (10:17 +0000)]
Merge from projects/sendfile:
- Use KASSERT()s instead of panic().
- Use sbavail() instead of sb_cc.

Sponsored by: Nginx, Inc.
Sponsored by: Netflix

9 years agoIn preparation of merging projects/sendfile, transform bare access to
glebius [Wed, 12 Nov 2014 09:57:15 +0000 (09:57 +0000)]
In preparation of merging projects/sendfile, transform bare access to
sb_cc member of struct sockbuf to a couple of inline functions:

sbavail() and sbused()

Right now they are equal, but once notion of "not ready socket buffer data",
will be checked in, they are going to be different.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

9 years agoFix an mdoc(7) macro that is not an option in the provided
gjb [Wed, 12 Nov 2014 08:36:42 +0000 (08:36 +0000)]
Fix an mdoc(7) macro that is not an option in the provided
description.

Bump Dd.

As CDDL License dictates, update the Copyright accordingly.

Sponsored by: The FreeBSD Foundation

9 years agoFix a few cases of use of uninitialized variables. Found with -Wall.
loos [Wed, 12 Nov 2014 03:59:26 +0000 (03:59 +0000)]
Fix a few cases of use of uninitialized variables.  Found with -Wall.

MFC after: 1 week

9 years agoFix the error checking, broken on r273337, to _not_ ignore controller
loos [Wed, 12 Nov 2014 03:07:46 +0000 (03:07 +0000)]
Fix the error checking, broken on r273337, to _not_ ignore controller
errors.

Without this fix you can't even scan the bus (all operations will always
succeed).

MFC with: r273337
Pointy hat to: loos

9 years agoFix the reversed sense of the PADCONF_NONE test.
ian [Wed, 12 Nov 2014 02:44:27 +0000 (02:44 +0000)]
Fix the reversed sense of the PADCONF_NONE test.

9 years agoRemove an #ifdef DEBUG wrapper, and instead use if (bootverbose).
ian [Wed, 12 Nov 2014 02:38:25 +0000 (02:38 +0000)]
Remove an #ifdef DEBUG wrapper, and instead use if (bootverbose).

9 years agoBugfixes for the imx5/imx6 iomux fdt_pinctrl driver.
ian [Wed, 12 Nov 2014 02:37:27 +0000 (02:37 +0000)]
Bugfixes for the imx5/imx6 iomux fdt_pinctrl driver.

I originally overlooked a couple flag bits defined in the fdt binding docs.
One flag suppresses the pad configuration (pullup/pulldown/etc).  The other
one requires that the SION (set input on) flag be set in the mux register.

Also, it appears from the data involved that if the input register
address in the config tuple is zero, there is no input configuration.  The
old code was writing to register zero, which contains a collection of misc
control bits (having nothing to do with input configuration) that probably
shouldn't get overwritten arbitrarily.  The bindings doc doesn't explictly
mention this.

9 years agoImprove CAM's reaction on asymmetric access errors.
mav [Wed, 12 Nov 2014 01:28:28 +0000 (01:28 +0000)]
Improve CAM's reaction on asymmetric access errors.

MFC after: 1 month

9 years agoSEEK_DATA has interesting behaviour for sparse files on ZFS. A sparse file
marcel [Wed, 12 Nov 2014 00:10:27 +0000 (00:10 +0000)]
SEEK_DATA has interesting behaviour for sparse files on ZFS.  A sparse file
with 128K of random data and truncated to 800K can have SEEK_DATA return -1
when given an offset of 128K. On UFS, the SEEK_DATA returns 800K (the size
of the file). SEEK_HOLE on ZFS seems to behave the same as UFS.

To handle this, map -1 to the size of the file (`end') when lseek returns
this for either SEEK_HOLE or SEEK_DATA. When sparse files are not supported
by the file system both `hole' and `data' will now be equal to `end' and we
will treat the entire file as data. This way, the -1 return for SEEK_DATA
on ZFS will end up doing the right thing.

Reported by: gjb@

MFC after: 3 days

9 years agoSince r273264 the SD card detection on Raspberry Pi is reliably working and
loos [Tue, 11 Nov 2014 23:55:37 +0000 (23:55 +0000)]
Since r273264 the SD card detection on Raspberry Pi is reliably working and
that expose new bugs with HS mode.

When the old code could not do the proper card detection it would boot with
lower defaults (and no HS mode) and this makes some HS cards boots.

Now, with the card always identified as HS capable, the sdhci controller
tries to run the card at HS speeds and makes the boot always fail.

Disable the HS mode for now (which still can be enabled with the tunable)
until it is properly fixed.

MFC with: r273264
Requested by: many

9 years agoFix build.
glebius [Tue, 11 Nov 2014 22:08:18 +0000 (22:08 +0000)]
Fix build.

9 years agoFix incorrect reading of 32-bit modinfo by 64-bit loaders.
grehan [Tue, 11 Nov 2014 22:03:11 +0000 (22:03 +0000)]
Fix incorrect reading of 32-bit modinfo by 64-bit loaders.

The various structures in the mod_metadata set of a FreeBSD kernel and
modules contain pointers. The FreeBSD loader correctly deals with a
mismatch in loader and kernel pointer size (e.g. 32-bit i386/ppc
loader, loading 64-bit amd64/ppc64 kernels), but wasn't dealing with
the inverse case where a 64-bit loader was loading a 32-bit kernel.

Reported by: ktcallbox@gmail.com with a bhyve/i386 and ZFS root install
Differential Revision: https://reviews.freebsd.org/D1129
Reviewed by: neel, jhb
MFC after: 1 week

9 years agoFix text output for the uptime command.
marcel [Tue, 11 Nov 2014 21:52:10 +0000 (21:52 +0000)]
Fix text output for the uptime command.

Reported by: "Max N. Boyarov" <zotrix@bsd.by>, ae@

9 years agoUpgrade libxo to 0.1.5
marcel [Tue, 11 Nov 2014 21:37:17 +0000 (21:37 +0000)]
Upgrade libxo to 0.1.5

Obtained from:  https://github.com/Juniper/libxo

9 years agoRemove SF_KQUEUE code. This code was developed at Netflix, but was not
glebius [Tue, 11 Nov 2014 20:32:46 +0000 (20:32 +0000)]
Remove SF_KQUEUE code.  This code was developed at Netflix, but was not
ever used.  It didn't go into stable/10, neither was documented.
It might be useful, but we collectively decided to remove it, rather
leave it abandoned and unmaintained.  It is removed in one single
commit, so restoring it should be easy, if anyone wants to reopen
this idea.

Sponsored by: Netflix

9 years agoAdd device ID for the T502-BT (dual-port 1G) adapter.
jhb [Tue, 11 Nov 2014 20:05:50 +0000 (20:05 +0000)]
Add device ID for the T502-BT (dual-port 1G) adapter.

Reviewed by: np
MFC after: 1 week

9 years agoFix whitespace.
dteske [Tue, 11 Nov 2014 19:45:14 +0000 (19:45 +0000)]
Fix whitespace.

Thanks to: nwhitehorn

9 years agoMove NFS and TFTP filesystems before the synthetic filesystems (bzip,
jhb [Tue, 11 Nov 2014 19:44:59 +0000 (19:44 +0000)]
Move NFS and TFTP filesystems before the synthetic filesystems (bzip,
gzip, and split).  "Real" filesystems should always be listed first so
that the "bare" filename is tried before alternate filenames.  For PXE
booting in particular this can remove a lot of spurious pathname lookups.

While here, move splitfs to the bottom after the bzip and gzip filesystems
as it is the least often used.

Tested by: Prokash Sinha <psinha@panasas.com>
MFC after: 1 week

9 years agoUse the correct device. Note this commit complements r274386.
jkim [Tue, 11 Nov 2014 19:42:10 +0000 (19:42 +0000)]
Use the correct device.  Note this commit complements r274386.

PR: 194884

9 years agoDefault `bsdconfig timezone' and `tzsetup' to `-s' in a VM.
dteske [Tue, 11 Nov 2014 19:37:17 +0000 (19:37 +0000)]
Default `bsdconfig timezone' and `tzsetup' to `-s' in a VM.

Recommended by: cperciva
Reviewed by: cperciva
Relnotes: tzsetup and bsdconfig now assume that the "hardware" clock inside a VM is set to UTC

9 years agoChange kbdb's kthr::cpu field into an int, to avoid gcc warnings about
dim [Tue, 11 Nov 2014 18:54:57 +0000 (18:54 +0000)]
Change kbdb's kthr::cpu field into an int, to avoid gcc warnings about
comparing it with NOCPU, which became -1 recently.  While here, avoid
using it for address calculations if it is negative.

Reviewed by: jhb, adrian
MFC after: 1 week

9 years agoUse the callout(9) API instead of timeout(9). To do this more cleanly,
jhb [Tue, 11 Nov 2014 18:15:05 +0000 (18:15 +0000)]
Use the callout(9) API instead of timeout(9).  To do this more cleanly,
convert a global timer to a per-controller timer.  This works much better
with locking and removes the need for several global lookup tables.

Tested by: ambrisko

9 years agoUse the correct device (child) when asking the bus layer about which power
adrian [Tue, 11 Nov 2014 17:14:11 +0000 (17:14 +0000)]
Use the correct device (child) when asking the bus layer about which power
state said device should go into.

This was a snafu introduced in the ACPI/PCI awareness separation.

When putting a device into a power state, the bus (and thus firmware,
eg ACPI) should be asked before hand to check whether the device
can indeed go into that power state.

There's a set of nodes in ACPI under each device - the _SxD nodes - which
state which ACPI power state to put the device into when the system is
going into power save state 'x'.  So when going into S3, the existence
of an _S3D node would override whatever the system was trying to do.

By default the PCI code wants to put devices into D3 before suspending.

I have a laptop here (Asus Zenbook - check the PR) whose EHCI controller
really wants to be in D2 during suspend, not D3.  So if we put it into
D3 and then try to enter S3, everything hangs.  The device itself
can go into D3 - it just can't be there when the call to ACPI to enter
S3 occurs.  The PCI patch fixes this.

jkim@ noticed that the same is needed for the ACPI child device
enumeration.

Thankyou to Matt Dillon (the programmer, not the actor) for buying me
this particular laptop so I could debug the issues with the Atheros
AR9485 that is in it.  It's his fault that I ended up with this
laptop and was sufficiently annoyed by the lack of USB suspend
to go down this rabbit hole.

Tested:

* Thinkpad T400
* Thinkpad X230
* Thinkpad T42
* Thinkpad T60
* Asus Zenbook (see PR)
* Asus EEEPC 701
* Asus EEEPC 1001PX

TODO:

* Figure out what we should do about devices we unload drivers for
  that want to be in a specific state when entering S3 / S4 -
  the "put devices into D3 if they're not bound to a driver" option
  may also mess with things.

PR: kern/194884
Reviewed by: jhb, jkim
MFC after: 1 week
Relnotes: yes
Sponsored by: Matt Dillon <dillon@apollo.backplane.com> (hardware)

9 years agoRemove myself from bxe(4) maintenance.
davidch [Tue, 11 Nov 2014 16:51:00 +0000 (16:51 +0000)]
Remove myself from bxe(4) maintenance.

9 years agoTest errno against EEXIST as well.
delphij [Tue, 11 Nov 2014 16:49:33 +0000 (16:49 +0000)]
Test errno against EEXIST as well.

MFC after: 3 days

9 years agoAdd workaround for vt efifb's early use of PHYS_TO_DMAP
emaste [Tue, 11 Nov 2014 14:59:46 +0000 (14:59 +0000)]
Add workaround for vt efifb's early use of PHYS_TO_DMAP

In vt_efifb_init the framebuffer's physaddr is passed to PHYS_TO_DMAP
before the DMAP is setup. The result is not actually accessed until
after the mapping is setup, though. Loosen the assertion in PHYS_TO_DMAP
for now, to allow use when dmaplimit == 0.

Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1142

9 years agoUpdate comment.
kib [Tue, 11 Nov 2014 14:30:35 +0000 (14:30 +0000)]
Update comment.

Noted by: dim
Approved by: secteam (des)
MFC after: 4 days

9 years agoFix gcc build: preserve const qualifier when casting input values.
des [Tue, 11 Nov 2014 13:37:28 +0000 (13:37 +0000)]
Fix gcc build: preserve const qualifier when casting input values.

Noticed by: bz@
Submitted by: dim@

9 years agoInitial attachment of the agp(4) to Haswell IGP. There is no handling
kib [Tue, 11 Nov 2014 12:56:30 +0000 (12:56 +0000)]
Initial attachment of the agp(4) to Haswell IGP.  There is no handling
of cacheablility control bits in GTT PTEs yet.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoBased on some BIOS configuration (GGC register in host bridge, bit 1),
kib [Tue, 11 Nov 2014 12:52:45 +0000 (12:52 +0000)]
Based on some BIOS configuration (GGC register in host bridge, bit 1),
IGP may declare subclass as either VGA-compatible, or non-VGA.  The
difference is that in the later case, IGP does not claim VGA cycles.
Other than that, the device functions normally, and agp_i810 should
attach to it.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoOn 965 and higher, map GTT as write-combining.
kib [Tue, 11 Nov 2014 12:37:13 +0000 (12:37 +0000)]
On 965 and higher, map GTT as write-combining.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoFix some minor TSO issues:
hselasky [Tue, 11 Nov 2014 12:05:59 +0000 (12:05 +0000)]
Fix some minor TSO issues:
- Improve description of TSO limits.
- Remove a not needed KASSERT()
- Remove some not needed variable casts.

Sponsored by: Mellanox Technologies
Discussed with: lstewart @
MFC after: 1 week

9 years agoMove struct ether_vlan_header to ethernet.h, out of if_vlan_var.h,
glebius [Tue, 11 Nov 2014 10:22:33 +0000 (10:22 +0000)]
Move struct ether_vlan_header to ethernet.h, out of if_vlan_var.h,
since this structure is protocol definition, not part of implementation.

9 years agoRename variable name from 'index' to 'idx' to avoid shadowing index(3).
delphij [Tue, 11 Nov 2014 05:49:57 +0000 (05:49 +0000)]
Rename variable name from 'index' to 'idx' to avoid shadowing index(3).

Noticed by: dim
MFC after: 2 weeks

9 years agoAdd missing privilege check when setting the dump device. Before that change it
pjd [Tue, 11 Nov 2014 04:48:09 +0000 (04:48 +0000)]
Add missing privilege check when setting the dump device. Before that change it
was possible for a regular user to setup the dump device if he had write access
to the given device. In theory it is a security issue as user might get access
to kernel's memory after provoking kernel crash, but in practise it is not
recommended to give regular users direct access to storage devices.

Rework the code so that we do privileges check within the set_dumper() function
to avoid similar problems in the future.

Discussed with: secteam

9 years agoRevert WiP to contrib/tzcode accidentally committed with r274364
ngie [Tue, 11 Nov 2014 04:07:41 +0000 (04:07 +0000)]
Revert WiP to contrib/tzcode accidentally committed with r274364

9 years agoAdd baud rate support to telnet(1)
ngie [Tue, 11 Nov 2014 04:06:05 +0000 (04:06 +0000)]
Add baud rate support to telnet(1)

This implements part of RFC-2217

It's based off a patch originally written by Sujal Patel at Isilon, and
contributions from other Isilon employees.

PR: 173728
Phabric: D995
Reviewed by: markj, markm
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoKill custom in_matroute() radix mathing function removing one rte mutex lock.
melifaro [Tue, 11 Nov 2014 02:52:40 +0000 (02:52 +0000)]
Kill custom in_matroute() radix mathing function removing one rte mutex lock.

Initially in_matrote() in_clsroute() in their current state was introduced by
r4105 20 years ago. Instead of deleting inactive routes immediately, we kept them
in route table, setting RTPRF_OURS flag and some expire time. After that, either
GC came or RTPRF_OURS got removed on first-packet. It was a good solution
in that days (and probably another decade after that) to keep TCP metrics.
However, after moving metrics to TCP hostcache in r122922, most of in_rmx
functionality became unused. It might had been used for flushing icmp-originated
routes before rte mutexes/refcounting, but I'm not sure about that.

So it looks like this is nearly impossible to make GC do its work nowadays:

in_rtkill() ignores non-RTPRF_OURS routes.
route can only become RTPRF_OURS after dropping last reference via rtfree()
which calls in_clsroute(), which, it turn, ignores UP and non-RTF_DYNAMIC routes.

Dynamic routes can still be installed via received redirect, but they
have default lifetime (no specific rt_expire) and no one has another trie walker
to call RTFREE() on them.

So, the changelist:
* remove custom rnh_match / rnh_close matching function.
* remove all GC functions
* partially revert r256695 (proto3 is no more used inside kernel,
  it is not possible to use rt_expire from user point of view, proto3 support
  is not complete)
* Finish r241884 (similar to this commit) and remove remaining IPv6 parts

MFC after: 1 month

9 years agoin the Linux section, properly define the NMG_LOCK type.
luigi [Tue, 11 Nov 2014 00:13:28 +0000 (00:13 +0000)]
in the Linux section, properly define the NMG_LOCK type.
Also import WITH_GENERIC in preparation to adding fine-grained
options to disable specific netmap components.

9 years ago- fix typo: use ring size from the rx ring, not the tx one (they should be
luigi [Tue, 11 Nov 2014 00:10:44 +0000 (00:10 +0000)]
- fix typo: use ring size from the rx ring, not the tx one (they should be
  the same, but just in case);
- reuse the previously computed len-1 value

9 years agoRemove kernel handling of ICMP_SOURCEQUENCH.
melifaro [Mon, 10 Nov 2014 23:10:01 +0000 (23:10 +0000)]
Remove kernel handling of ICMP_SOURCEQUENCH.
It hasn't been used for a very long time.
Additionally, it was deprecated by RFC 6633.

9 years agofix a typo
luigi [Mon, 10 Nov 2014 21:00:23 +0000 (21:00 +0000)]
fix a typo

9 years agoinitialize *color if passed as an argument
luigi [Mon, 10 Nov 2014 20:25:33 +0000 (20:25 +0000)]
initialize *color if passed as an argument

9 years agosync a comment with our internal repo
luigi [Mon, 10 Nov 2014 20:19:58 +0000 (20:19 +0000)]
sync a comment with our internal repo

9 years agocxgbe(4): adjust PMRX and PMTX parameters.
np [Mon, 10 Nov 2014 19:45:28 +0000 (19:45 +0000)]
cxgbe(4): adjust PMRX and PMTX parameters.

MFC after: 1 week

9 years agoAdd /usr/lib/debug directory to hier(7)
emaste [Mon, 10 Nov 2014 18:20:46 +0000 (18:20 +0000)]
Add /usr/lib/debug directory to hier(7)

The canonical standalone debug directory established by the GNU
toolchain is /usr/lib/debug, and we use it when WITH_DEBUG_FILES is set.
Mention it in the file system hierarchy page.

Reviewed by: bcr
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1134

9 years agoAdd sa6_checkzone_ifp() function. It checks correctness of struct
ae [Mon, 10 Nov 2014 16:12:51 +0000 (16:12 +0000)]
Add sa6_checkzone_ifp() function. It checks correctness of struct
sockaddr_in6, usually obtained from the user level through ioctl.
It initializes sin6_scope_id using given interface.

Sponsored by: Yandex LLC

9 years ago* Make nd6_dad_duplicated() constant.
melifaro [Mon, 10 Nov 2014 16:01:39 +0000 (16:01 +0000)]
* Make nd6_dad_duplicated() constant.
* Simplify refcounting by using nd6_dad_add() / nd6_dad_del().

Reviewed by: ae
MFC after: 2 weeks
Sponsored by: Yandex LLC

9 years agoRemove link-local multicast routes remnants from in6_purgeaddr.
ae [Mon, 10 Nov 2014 16:01:31 +0000 (16:01 +0000)]
Remove link-local multicast routes remnants from in6_purgeaddr.
Also merge in6_purgeaddr_mc with in6_purgeaddr.

Sponsored by: Yandex LLC

9 years agoConsistently use if_link.
glebius [Mon, 10 Nov 2014 15:56:30 +0000 (15:56 +0000)]
Consistently use if_link.

Reviewed by: ae, melifaro

9 years agoWhen sleeping waiting for the profiling stop, always set P_STOPPROF
kib [Mon, 10 Nov 2014 14:11:17 +0000 (14:11 +0000)]
When sleeping waiting for the profiling stop, always set P_STOPPROF
before dropping process lock.  Clear P_STOPPROF when doing wakeup.

Both issues caused thread to hang in stopprofclock() "stopprof" sleep.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoFor now handle only multicast addresses, we still use routes to
ae [Mon, 10 Nov 2014 10:59:08 +0000 (10:59 +0000)]
For now handle only multicast addresses, we still use routes to
LLA unicasts yet.

Sponsored by: Yandex LLC

9 years agoI just realized that the previous commit message makes no sense: the
des [Mon, 10 Nov 2014 09:55:35 +0000 (09:55 +0000)]
I just realized that the previous commit message makes no sense: the
first sentence should have read "Constify the AES and SHA-256 code and
wrappers".  This allows us to feed zero_region (which is const) to the
hash function during reseeding and thereby implement the FS&K version of
SHAd-256 instead of the older F&S version.

Approved by: so (self)

9 years agoConstify the AES code and propagate to consumers. This allows us to
des [Mon, 10 Nov 2014 09:44:38 +0000 (09:44 +0000)]
Constify the AES code and propagate to consumers.  This allows us to
update the Fortuna code to use SHAd-256 as defined in FS&K.

Approved by: so (self)

9 years agoreturn kernel-supplied error if available.
luigi [Mon, 10 Nov 2014 08:31:56 +0000 (08:31 +0000)]
return kernel-supplied error if available.
Also fix field names in a comment.

9 years agoMFV r274273:
delphij [Mon, 10 Nov 2014 08:20:21 +0000 (08:20 +0000)]
MFV r274273:

ZFS large block support.

Please note that booting from datasets that have recordsize greater
than 128KB is not supported (but it's Okay to enable the feature on
the pool).  This *may* remain unchanged because of memory constraint.

Limited safety belt is provided for mounted root filesystem but use
caution is advised.

Illumos issue:
    5027 zfs large block support

MFC after: 1 month

9 years agoUse embedded scope zone id to determine outgoing interface for link-local
ae [Sun, 9 Nov 2014 22:54:40 +0000 (22:54 +0000)]
Use embedded scope zone id to determine outgoing interface for link-local
and node-local addresses.

9 years agoHandle PREEMPT AND ABORT service action equal to PREEMPT.
mav [Sun, 9 Nov 2014 22:43:29 +0000 (22:43 +0000)]
Handle PREEMPT AND ABORT service action equal to PREEMPT.

With command serialization used in CTL, there are no other commands to abort
when PREEMPT AND ABORT gets to run, so it is practically equal to PREEMPT.

MFC after: 1 week

9 years agoRenove faith(4) and faithd(8) from base. It looks like industry
melifaro [Sun, 9 Nov 2014 21:33:01 +0000 (21:33 +0000)]
Renove faith(4) and faithd(8) from base. It looks like industry
have chosen different (and more traditional) stateless/statuful
NAT64 as translation mechanism. Last non-trivial commits to both
faith(4) and faithd(8) happened more than 12 years ago, so I assume
it is time to drop RFC3142 in FreeBSD.

No objections from: net@

9 years agoTo allow a request to be submitted from within the callback routine of
tychon [Sun, 9 Nov 2014 21:08:52 +0000 (21:08 +0000)]
To allow a request to be submitted from within the callback routine of
a completing one increase the total by 1 but don't advertise it.

Reviewed by: grehan

9 years agoWe moved to ada a while ago, reflect that in the example.
netchild [Sun, 9 Nov 2014 20:43:50 +0000 (20:43 +0000)]
We moved to ada a while ago, reflect that in the example.

9 years agoMake both iSCSI initiator and target support base64 encoded CHAP data.
mav [Sun, 9 Nov 2014 20:39:08 +0000 (20:39 +0000)]
Make both iSCSI initiator and target support base64 encoded CHAP data.

While all tested initiators and targets use hex-encoded CHAP data, RFC also
allows base64 encoding there, and Microsoft certificaition tool uses it.

Reviewed by: trasz (earlier version)
MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

9 years agoEnable LRO by default when available on vtnet interfaces
bryanv [Sun, 9 Nov 2014 20:04:12 +0000 (20:04 +0000)]
Enable LRO by default when available on vtnet interfaces

The prior change to not enable LRO by default has confused several
people. The configurations where LRO is problematic is not the
typical use case for VirtIO, and due to other issues, this often
requires checksum offloading to be disabled anyways.

PR: 185864
MFC after: 2 weeks

9 years agoRemove unused includes.
glebius [Sun, 9 Nov 2014 19:58:30 +0000 (19:58 +0000)]
Remove unused includes.

Reviewed by: kib

9 years agoAttempt to report a better error if sanitize is not supported
bryanv [Sun, 9 Nov 2014 18:13:08 +0000 (18:13 +0000)]
Attempt to report a better error if sanitize is not supported

MFC after: 1 month

9 years agoFinish r274315: remove union 'u' from struct pf_send_entry.
melifaro [Sun, 9 Nov 2014 17:01:54 +0000 (17:01 +0000)]
Finish r274315: remove union 'u' from struct pf_send_entry.

Suggested by: kib

9 years agoRemove unused 'struct route *' argument from nd6_output_flush().
melifaro [Sun, 9 Nov 2014 16:20:27 +0000 (16:20 +0000)]
Remove unused 'struct route *' argument from nd6_output_flush().

9 years agoRemove unused 'struct route' fields.
melifaro [Sun, 9 Nov 2014 16:15:28 +0000 (16:15 +0000)]
Remove unused 'struct route' fields.

9 years agoReport the 1-based key numbers rather than the 0-based ones to be consistent.
phk [Sun, 9 Nov 2014 15:53:29 +0000 (15:53 +0000)]
Report the 1-based key numbers rather than the 0-based ones to be consistent.

Fix documentation for destroy command.  Not sure how the wrong explanation
happened.

Spotted by: mwlucas

9 years agoTranslate the errno to gctl_error() texts.
phk [Sun, 9 Nov 2014 15:52:11 +0000 (15:52 +0000)]
Translate the errno to gctl_error() texts.

Spotted by: mwlucas

9 years agoHandle full-path-resolutions to detect the magic-ness of the pkg port.
phk [Sun, 9 Nov 2014 15:33:31 +0000 (15:33 +0000)]
Handle full-path-resolutions to detect the magic-ness of the pkg port.

9 years agoAdd HISTORY section to ctld(8).
trasz [Sun, 9 Nov 2014 13:45:35 +0000 (13:45 +0000)]
Add HISTORY section to ctld(8).

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoFix several nits in redirection handling - don't use wrong CSG,
trasz [Sun, 9 Nov 2014 13:30:02 +0000 (13:30 +0000)]
Fix several nits in redirection handling - don't use wrong CSG,
and avoid use-after-free.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoAdd support for sending redirections to iSCSI target.
trasz [Sun, 9 Nov 2014 13:01:09 +0000 (13:01 +0000)]
Add support for sending redirections to iSCSI target.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoRemove remnants of if_ef(4).
glebius [Sun, 9 Nov 2014 11:13:15 +0000 (11:13 +0000)]
Remove remnants of if_ef(4).

9 years agoUse standard mtx(9), rwlock(9), sx(9) system initialization macros
glebius [Sun, 9 Nov 2014 11:11:08 +0000 (11:11 +0000)]
Use standard mtx(9), rwlock(9), sx(9) system initialization macros
instead of doing initialization manually.

Sponsored by: Nginx, Inc.
Sponsored by: Netflix

9 years agoMFV r274272 and diff reduction with upstream.
delphij [Sun, 9 Nov 2014 07:37:00 +0000 (07:37 +0000)]
MFV r274272 and diff reduction with upstream.

Illumos issue:
    5244 zio pipeline callers should explicitly invoke next stage

Tested with: ztest plus ZFS over GELI configuration
MFC after: 1 month

9 years agoApply upstream 13597:3eac1e8e0f4c (git: illumos-gate@aa846ad9):
delphij [Sun, 9 Nov 2014 01:42:28 +0000 (01:42 +0000)]
Apply upstream 13597:3eac1e8e0f4c (git: illumos-gate@aa846ad9):

Initialize tqent_flags in the userland taskq implementation.  Without
this the assertion of tq->tq_freelist != NULL may fail in taskq_destroy.

The problem is that tqent_flags is never initialized in the userland
implementation while the kernel one does initialize it.  Without proper
initialization, the flag may have its lowest bit set, making it treated
as TQENT_FLAG_PREALLOC and never removing taskq_ent_t from tq_freelist.

MFC after: 2 weeks

9 years agoRemove ip6_getdstifaddr() and all functions to work with auxiliary data.
ae [Sat, 8 Nov 2014 19:38:34 +0000 (19:38 +0000)]
Remove ip6_getdstifaddr() and all functions to work with auxiliary data.
It isn't safe to keep unreferenced ifaddrs. Use in6ifa_ifwithaddr() to
determine ifaddr corresponding to destination address. Since currently
we keep addresses with embedded scope zone, in6ifa_ifwithaddr is called
with zero zoneid and marked with XXX.

Also remove route and lle lookups from ip6_input. Use in6ifa_ifwithaddr()
instead.

Sponsored by: Yandex LLC

9 years agoRevert r274200. Implicitly setting DEBUG_FLAGS when WITH_CTF is true is
markj [Sat, 8 Nov 2014 18:16:39 +0000 (18:16 +0000)]
Revert r274200. Implicitly setting DEBUG_FLAGS when WITH_CTF is true is
not the right way to do this.

Requested by: kan

9 years agoAdd llvm patch corresponding to r274286.
dim [Sat, 8 Nov 2014 16:37:59 +0000 (16:37 +0000)]
Add llvm patch corresponding to r274286.

9 years agoAfter r274246 make the tree compile again.
bz [Sat, 8 Nov 2014 14:41:32 +0000 (14:41 +0000)]
After r274246 make the tree compile again.

gcc requires variables to be initialised in two places.  One of them
is correctly  used only under the same conditional though.

For module builds properly check if the kernel supports INET or INET6,
as otherwise various mips kernels without IPv6 support would fail to build.

9 years agoPull in r201784 from upstream llvm trunk (by Benjamin Kramer):
dim [Sat, 8 Nov 2014 13:19:48 +0000 (13:19 +0000)]
Pull in r201784 from upstream llvm trunk (by Benjamin Kramer):

  AsmParser: Disable Darwin-style macro argument expansion on non-darwin targets.

  There is code in the wild that relies on $0 not being expanded.

This fixes some cases of using $ signs in literals being incorrectly
assembled.

Reported by: Richard Henderson
Upstream PR: http://llvm.org/PR21500
MFC after: 3 days

9 years agoMFi386 r253328:
kib [Sat, 8 Nov 2014 11:56:26 +0000 (11:56 +0000)]
MFi386 r253328:
Create a proper stack frame for amd64 version of bcopy().  Note that
this also makes the stack properly aligned in the function, despite it
is not strictly needed.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoImprove wording in ctl.conf(5).
trasz [Sat, 8 Nov 2014 07:54:34 +0000 (07:54 +0000)]
Improve wording in ctl.conf(5).

Differential Revision: https://reviews.freebsd.org/D1020
Reviewed by: bcr@ (earlier version), wblock@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoctld(8) doesn't require -lcam or -lssl; remove those from DPADD and LDADD.
trasz [Sat, 8 Nov 2014 07:50:57 +0000 (07:50 +0000)]
ctld(8) doesn't require -lcam or -lssl; remove those from DPADD and LDADD.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoMFV r274271:
delphij [Sat, 8 Nov 2014 07:30:40 +0000 (07:30 +0000)]
MFV r274271:

Improve zdb -b performance:

 - Reduce gethrtime() call to 1/100th of blkptr's;
 - Skip manipulating the size-ordered tree;
 - Issue more (10, previously 3) async reads;
 - Use lighter weight testing in traverse_visitbp();

Illumos issue:
    5243 zdb -b could be much faster

MFC after: 2 weeks

9 years agoifindex_alloc_locked() never fails and doesn't have no-lock version,
glebius [Sat, 8 Nov 2014 07:23:01 +0000 (07:23 +0000)]
ifindex_alloc_locked() never fails and doesn't have no-lock version,
so change the prototype.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

9 years agoFix build race in Makefile.inc1 after r274226 by adding lib/libm__L dependency
ngie [Sat, 8 Nov 2014 04:24:54 +0000 (04:24 +0000)]
Fix build race in Makefile.inc1 after r274226 by adding lib/libm__L dependency
for gnu/lib/libdialog

Sponsored by: EMC / Isilon Storage Division

9 years agoUse PROGS instead of PROG and remove unnecessary SRCS?= assignment
ngie [Sat, 8 Nov 2014 03:20:56 +0000 (03:20 +0000)]
Use PROGS instead of PROG and remove unnecessary SRCS?= assignment

Using PROG instead of PROGS will in cases of high -j with -DNO_ROOT cause
the PROG to show up more than once as it's handling the SCRIPTS install case
in a recursive manner, separate from the non-recursive case

After the recent batch of commits to bsd.progs.mk to fix behavior with how
variables are defaulted to, explicitly setting SRCS for a PROG is no longer
required

MFC after: 1 week
Reviewed by: asomers
Phabric: D1130
Sponsored by: EMC / Isilon Storage Division