asomers [Thu, 26 Jan 2017 20:10:31 +0000 (20:10 +0000)]
MFC r310786, r310803, r310985, r311894
r310786:
Reduce the runtime of the GELI tests
There is no reduction in test coverage. On my system runtime is reduced
from 38m32s to 6m24s.
tests/sys/geom/class/eli/conf.sh
tests/sys/geom/class/eli/init_a_test.sh
tests/sys/geom/class/eli/init_test.sh
tests/sys/geom/class/eli/integrity_copy_test.sh
tests/sys/geom/class/eli/integrity_data_test.sh
tests/sys/geom/class/eli/integrity_hmac_test.sh
tests/sys/geom/class/eli/onetime_a_test.sh
tests/sys/geom/class/eli/onetime_test.sh
Move the looping code into common functions in conf.sh, and remove
alias ciphers from the list.
tests/sys/geom/class/eli/init_a_test.sh
tests/sys/geom/class/eli/init_test.sh
tests/sys/geom/class/eli/integrity_copy_test.sh
tests/sys/geom/class/eli/integrity_data_test.sh
tests/sys/geom/class/eli/integrity_hmac_test.sh
tests/sys/geom/class/eli/onetime_a_test.sh
Move a few commands that don't need to be in the inner loop out.
tests/sys/geom/class/eli/init_test.sh
tests/sys/geom/class/eli/onetime_a_test.sh
Reduce the sector count
tests/sys/geom/class/eli/Makefile
tests/sys/geom/class/eli/init_alias_test.sh
Add a test for initializing a GELI device using one of the cipher
aliases, and check that the alias is correctly interpreted.
avg [Thu, 26 Jan 2017 16:38:53 +0000 (16:38 +0000)]
MFC r312532: don't abort writing of a core dump after EFAULT
Note that this change substantially differs from the change in head
because of an unmerged earlier change that probably can not be merged
for POLA reasons.
dim [Wed, 25 Jan 2017 20:12:07 +0000 (20:12 +0000)]
MFC r311933:
Use proper prototypes in struct boot_module_t
With clang 4.0.0, we are getting the following warnings about struct
boot_module_t in efi's boot_module.h:
In file included from sys/boot/efi/boot1/ufs_module.c:41:
sys/boot/efi/boot1/boot_module.h:67:14: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
void (*init)();
^
void
sys/boot/efi/boot1/boot_module.h:92:16: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
void (*status)();
^
void
sys/boot/efi/boot1/boot_module.h:95:24: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
dev_info_t *(*devices)();
^
void
3 errors generated.
Fix this by adding 'void' to the parameter lists. No functional change.
dim [Wed, 25 Jan 2017 19:55:35 +0000 (19:55 +0000)]
MFC r311932:
Make EFI_RESERVED_SERVICE a proper prototype
With clang 4.0.0, the EFI API header causes the following warning:
In file included from sys/boot/efi/loader/bootinfo.c:43:
In file included from sys/boot/efi/loader/../include/efi.h:52:
sys/boot/efi/include/efiapi.h:534:32: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
(EFIAPI *EFI_RESERVED_SERVICE) (
^
dim [Wed, 25 Jan 2017 19:16:24 +0000 (19:16 +0000)]
MFC r311929:
Don't include <errno.h> in reloc_elf.c, as it includes <stand.h> just
after it, which has a conflicting definition of errno. This leads to
the following warning with clang 4.0.0:
In file included from sys/boot/common/reloc_elf32.c:6:
In file included from sys/boot/common/reloc_elf.c:37:
/usr/obj/usr/src/tmp/usr/include/stand.h:155:12: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
extern int errno;
^
sys/sys/errno.h:46:26: note: expanded from macro 'errno'
#define errno (* __error())
^
There were several places where reference to compression were left
unfinished. Furthermore, KASSERTs contained references to MPPC_INVALID
which is not defined in the tree and therefore were sure to break with
INVARIANTS: comment them out.
jilles [Sun, 22 Jan 2017 21:34:26 +0000 (21:34 +0000)]
MFC r312230: skel: Do not set -o emacs in .shrc.
sh has defaulted to 'set -o emacs' since FreeBSD 9.0. Therefore, do not set
this again in .shrc, since that only serves to prevent invocations like
'sh -o vi' and 'sh +o emacs' to have the intended effect.
mav [Sat, 21 Jan 2017 08:39:39 +0000 (08:39 +0000)]
MFC r310646: Do not update "saved" mode page on every MODE SELECT.
We do not have non-volatile memory to really save those values, so we
neither report nor support this capability. Also saved mode pages are
not replicated between HA peers now.
mav [Sat, 21 Jan 2017 08:34:27 +0000 (08:34 +0000)]
MFC r310635: Decouple limits on number of LUNs per port and LUs per CTL.
Those two values are not directly related, so make them independent.
This does not change any limits immediately, but makes number of LUNs
per port controllable via tunable/sysctl kern.cam.ctl.lun_map_size.
After this change increasing CTL_MAX_LUNS should be pretty cheap,
and even making it tunable should be easy.
ngie [Fri, 20 Jan 2017 06:24:31 +0000 (06:24 +0000)]
MFC r312331:
r312331 (by glebius):
Fix regression from r310655, which broke operation of bsnmpd if it is bound
to a non-wildcard address. As documented in ip(4), doing sendmsg(2) with
IP_SENDSRCADDR on a socket that is bound to non-wildcard address is
completely different to using this control message on a wildcard one.
A fix is to add a bool to mark whether we did setsockopt(IP_RECVDSTADDR)
on the socket, and use IP_SENDSRCADDR control message only if we did.
While here, garbage collect absolutely useless udp_recv() function that
establishes some structures on stack to never use them later.
rpokala [Thu, 19 Jan 2017 23:44:05 +0000 (23:44 +0000)]
MFC r311963: Remove writability requirement for single-mbuf, contiguous-
range m_pulldown()
m_pulldown() only needs to determine if a mbuf is writable if it is going to
copy data into the data region of an existing mbuf. It does this to create a
contiguous data region in a single mbuf from multiple mbufs in the chain. If
the requested memory region is already contiguous and nothing needs to
change, the mbuf does not need to be writeable.
jpaetzel [Thu, 19 Jan 2017 23:42:26 +0000 (23:42 +0000)]
MFC 310847 310864
Harden CARP against network loops.
If there is a loop in the network a CARP that is in MASTER state will see it's
own broadcasts, which will then cause it to assume BACKUP state. When it
assumes BACKUP it will stop sending advertisements. In that state it will no
longer see advertisements and will assume MASTER...
We can't catch all the cases where we are seeing our own CARP broadcast, but
we can catch the obvious case.
Unbreak ip_carp with WITHOUT_INET6 enabled by conditionalizing all IPv6
structs under the INET6 #ifdef. Similarly (even though it doesn't seem
to affect the build), conditionalize all IPv4 structs under the INET
#ifdef
This also unbreaks the LINT-NOINET6 tinderbox target on amd64; I have not
verified other MACHINE/TARGET pairs (e.g. armv6/arm).
o Use correct response bits for MMC_RSP_R4-R7 types
o Make sdhci(4) work after suspend/resume for chipsets that require
the frequency quirk. This makes it work on eg ThinkPad T420.
o Add a convenience macro that masks all the bits related to clock divisors
in all versions of the sdhci spec (the HI bits are just unused reserved
bits in earlier versions).
o In mmcsd_task(), bio_resid was not being set to 0 on a successful read
or write, resulting in random short-read and short-write returns for
requests. Fixing this fixes nominal block I/O via mmcsd(4).
pfg [Wed, 18 Jan 2017 15:23:40 +0000 (15:23 +0000)]
MFC r311947, r311981:
rpcgen(1): Avoid unused variable warning on generated code.
Avoid "unused variable 'i'" warnings in generated .c files by only
emitting the "int i;" for non-opaque arrays. Opaque arrays use
xdr_opaque() rather than iterating over the array.
Obtained from: OpenBSD (CVS rev 1.28)
rpcgen(1): Check getrlimit() return for generated code.
yongari [Wed, 18 Jan 2017 02:41:13 +0000 (02:41 +0000)]
MFC r302548:
Belatedly remove CSUM_IP_FRAGS and CSUM_FRAGMENT offloading
capabilities. It was removed in r243624 and r254804/r271006
respectively.
This file and mbuf(9) needs updates for other offloading
capabilities(i.e. CSUM_SCTP and CSUM_TSO).
yongari [Wed, 18 Jan 2017 01:53:07 +0000 (01:53 +0000)]
MFC r304574-304575,304584:
r304574:
Correct DMA channel number selection on AR816x family of
controllers. For Gigabit Ethernet version of AR816x, AR813x/AR815x
except L1D controller, use vendor recommended ASPM parameters.
While here, increase alc_dma_burst array size. Broken H/W can
return bogus value in theory.
r304575:
Add Killer E2400 Gigabit Ethernet support.
It seems Killer E2200/E2400 has a BIOS misconfiguration or silicon
bug which triggers DMA write errors when driver uses advertised
maximum payload size. Force the maximum payload size to 128 bytes
in DMA configuration.
This change should fix occasional DMA write errors reported on
Killer E2200.
ngie [Mon, 16 Jan 2017 07:10:45 +0000 (07:10 +0000)]
MFC r311140:
Only bake krb5_config.h support in to ssh(3), etc if both MK_GSSAPI and
MK_KERBEROS_SUPPORT != no
This fixes the odd case where someone specified MK_GSSAPI=no and
MK_KERBEROS_SUPPORT=yes (which admittedly, probably doesn't make sense,
but the build system doesn't prevent this case today, and it didn't when
I filed the bug back in 2011 either).
ngie [Mon, 16 Jan 2017 07:04:08 +0000 (07:04 +0000)]
MFC r310655:
Fix bsnmpd sending/receiving with multi-homed configurations or INADDR_ANY used
as the listening address in snmpd_input(..)
Stash the IPv4 address of the receiver via the recv(..) callback and use it in
the send(..) callback for the transport by specifying IP_SENDSRCADDR for the
control message type.
Add sendmsg logic to the UDP transport's send(..) callback and use the
respective send(..) callback for the transport instead of calling sendto in
snmpd_input(..).
ngie [Mon, 16 Jan 2017 06:54:07 +0000 (06:54 +0000)]
MFC r311741,r311761:
r311741:
Add a REVISION section to track changes for the hostres module
There haven't been any changes to the MIB definition, so the REVISION remains
static at the version it was imported at
r311761:
Add a REVISION section to track changes for the BEGEMOT-NETGRAPH MIB file
This change also documents the modification harti made to a handful of
objects in r122758 (the max OCTET STRING width was increased from 15 to
31 octets)
Raise the SDHCI timeout to 10 seconds and add a sysctl to allow changing
this value at runtime.
Add support for the BCM57765 card reader.
Toggle card insert/remove interrupt enable bits on events.
Add a new sdhci interface method, get_card_present().
Now that the PRESENT_STATE register is only used for the inhibit bits loop
in this function, sdhci_start_command(), eliminate the state variable and
restructure the loop to read the register just once at the top of the loop.
Add support for non-removable media, and a quirk to use polling to detect
card insert/remove events on controllers that don't implement the insert
and remove interrupts.
Add sdhci_handle_card_present_locked() that can be called from the interrupt
handler which already holds the mutex, and have sdhci_handle_card_present()
be just a tiny wrapper that does the locking for external callers.
np [Sat, 14 Jan 2017 15:43:31 +0000 (15:43 +0000)]
MFC r311831 and r311832.
r311831:
cxgbe(4): The wraparound logic in start_wrq_wr() should not get involved
in work requests that end at the end of the descriptor ring, even though
the pidx wraps around to 0.
r311832:
cxgbe(4): Enable automatic cidx flush for all control queues.
arybchik [Sat, 14 Jan 2017 10:39:00 +0000 (10:39 +0000)]
MFC r311877
sfxge(4): avoid unnecessary mbuf data prefetch
Unnecessary prefetch just loads HW prefetcher and displaces other
cache entries (which could be really useful).
If we parse mbuf for TSO early and use firmware-assisted TSO, we do not
expect mbuf data access when we compose firmware-assisted TSO (v1 or v2)
option descriptors. If packet header needs to be linearized or finally
FATSO cannot be used because of, for example, too big header, we do not
care about a bit more performance degradation because of prefetch
absence (it is better to optimize more common case).
np [Sat, 14 Jan 2017 04:34:30 +0000 (04:34 +0000)]
MFC r311569, r311657, and r311949.
r311569:
Fix comment in t4_tom. No functional change.
r311657:
cxgbe/t4_tom: Fix tid accounting. An offloaded IPv6 connection uses 2
tids, not 1, in the hardware.
r311949:
cxgbe/tom: Add VIMAGE support to the TOE driver.
Active Open:
- Save the socket's vnet at the time of the active open (t4_connect) and
switch to it when processing the reply (do_act_open_rpl or
do_act_establish).
Passive Open:
- Save the listening socket's vnet in the driver's listen_ctx and switch
to it when processing incoming SYNs for the socket.
- Reject SYNs that arrive on an ifnet that's not in the same vnet as the
listening socket.
CLIP (Compressed Local IPv6) table:
- Add only those IPv6 addresses to the CLIP that are in a vnet
associated with one of the card's ifnets.
Misc:
- Set vnet from the toepcb when processing TCP state transitions.
- The kernel sets the vnet when calling the driver's output routine
so t4_push_frames runs in proper vnet context already. One exception
is when incoming credits trigger tx within the driver's ithread. Set
the vnet explicitly in do_fw4_ack for that case.