]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
5 years agoAdd support for loader veriexec
Simon J. Gerraty [Fri, 12 Apr 2019 01:03:00 +0000 (01:03 +0000)]
Add support for loader veriexec

Also sbin/veriexec for mac_veriexec

MFC r343281,344564-344568,344780,344784,345289,346070

5 years agoMFC r345693, 345694: rtld: attempt to fix reloc_nonplt_object TLS allocation
Ed Maste [Fri, 12 Apr 2019 00:31:22 +0000 (00:31 +0000)]
MFC r345693, 345694: rtld: attempt to fix reloc_nonplt_object TLS allocation

on arm and mips

allocate_tls_offset returns true on success.  This still needs more
testing and review, but this change is consistent with other archs.

PR: 236880
Reported by: Andrew Gierth <andrew@tao11.riddles.org.uk> (arm)
Sponsored by: The FreeBSD Foundation

5 years agoMFC r344936: MFV/ZoL: Disable LBA weighting on files and SSDs
Alexander Motin [Thu, 11 Apr 2019 13:20:48 +0000 (13:20 +0000)]
MFC r344936: MFV/ZoL: Disable LBA weighting on files and SSDs

The LBA weighting makes sense on rotational media where the outer tracks
have twice the bandwidth of the inner tracks. However, it is detrimental
on nonrotational media such as solid state disks, where the only effect
is to ensure that metaslabs enter the best-fit allocation behavior
sooner, which is detrimental to performance. It also makes no sense on
files where the underlying filesystem can arrange things however it
wants.

Author: Richard Yao <ryao@gentoo.org>
Signed-off-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3712
zfsonlinux/zfs@fb40095f5f0853946f8150481ca22602d1334dfe

To reduce code divergence this merge replaces equivalent but different
FreeBSD code detecting non-rotating medium vdevs.

5 years agoMFC r344934, r345014: Add separate aggregation limit for non-rotating media.
Alexander Motin [Thu, 11 Apr 2019 13:19:26 +0000 (13:19 +0000)]
MFC r344934, r345014: Add separate aggregation limit for non-rotating media.

Before sequential scrub patches ZFS never aggregated I/Os above 128KB.
Sequential scrub bumped that to 1MB, which motivation I understand for
spinning disks, since it should reduce number of head seeks.  But for
SSDs it makes much less sense to me, especially on FreeBSD, where due
to MAXPHYS limitation device will likely still see bunch of 128KB I/Os
instead of one large.  Having more strict aggregation limit allows to
avoid allocation of large memory buffer and memcpy to/from it, that is
a serious problem when bandwidth reaches few GB/s.

Sponsored by: iXsystems, Inc.

5 years agoMFC r344926:
Alexander Motin [Thu, 11 Apr 2019 13:17:51 +0000 (13:17 +0000)]
MFC r344926:
MFV/ZoL: Fix zfs_vdev_aggregation_limit bounds checking

Update the bounds checking for zfs_vdev_aggregation_limit so that
it has a floor of zero and a maximum value of the supported block
size for the pool.

Additionally add an early return when zfs_vdev_aggregation_limit
equals zero to disable aggregation.  For very fast solid state or
memory devices it may be more expensive to perform the aggregation
than to issue the IO immediately.

Author: Brian Behlendorf <behlendorf1@llnl.gov>
zfsonlinux/zfs@a58df6f53687ac6d1dee21f60de41b2552a43201

MFV/ZoL: Cap maximum aggregate IO size

Commit 8542ef8 allowed optional IOs to be aggregated beyond
the specified aggregation limit.  Since the aggregation limit
was also used to enforce the maximum block size, setting
`zfs_vdev_aggregation_limit=16777216` could result in an
attempt to allocate an ABD larger than 16M.

Author: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #6259
Closes #6270
zfsonlinux/zfs@2d678f779aba26a93314c8ee1142c3985fa25cb6

5 years agoMFC r345850: Fix typos in r345849.
Alexander Motin [Thu, 11 Apr 2019 13:12:25 +0000 (13:12 +0000)]
MFC r345850: Fix typos in r345849.

5 years agoMFC r345849: List few more ATA commands.
Alexander Motin [Thu, 11 Apr 2019 13:11:20 +0000 (13:11 +0000)]
MFC r345849: List few more ATA commands.

5 years agoMFC r345887:
Guangyuan Yang [Thu, 11 Apr 2019 00:41:07 +0000 (00:41 +0000)]
MFC r345887:

Rewrite intro(4) man page.

- Remove issues that no longer apply thanks to devfs
- Add language pointing out devfs's role and referencing its config
- Add a "historical notes" section and move discussion of block vs character devs to it, including pointing out the removal of block devs
- Modernize some examples

PR: 236970
Submitted by: andrew@tao173.riddles.org.uk
Reviewed by: 0mp
Differential Revision: https://reviews.freebsd.org/D19799

5 years agoMFC r345497:
Martin Matuska [Wed, 10 Apr 2019 21:45:23 +0000 (21:45 +0000)]
MFC r345497:
Sync libarchive with vendor.

Relevant vendor changes:
  PR #1153: fixed 2 bugs in ZIP reader [1]
  PR #1143: ensure archive_read_disk_entry_from_file() uses ARCHIVE_READ_DISK
  Changes to file flags code, support more file flags on FreeBSD:
    UF_OFFLINE, UF_READONLY, UF_SPARSE, UF_REPARSE, UF_SYSTEM
    UF_ARCHIVE is not supported by intention (yet)

PR: 236300 [1]

5 years agoMFC r345847:
Konstantin Belousov [Wed, 10 Apr 2019 08:34:17 +0000 (08:34 +0000)]
MFC r345847:
msdosfs: zero tail of the last block on truncation for VREG vnodes as well.

5 years agoMFC r344662:
Enji Cooper [Tue, 9 Apr 2019 16:35:23 +0000 (16:35 +0000)]
MFC r344662:

Remove references to pdwait4(2) and `CAP_PDWAIT` from rights(4)

@cem removed references to pdwait4(2) (a nonexistent syscall) in
r320058.

This change removes references to pdwait4(2) and `CAP_PDWAIT` in
rights(4) to not mislead the user into thinking that pdwait4(2)/`CAP_PDWAIT` is
actually implemented in the stock FreeBSD kernel.

The goal of this functionality was to simplify monitoring/manipulating
processes started with `pdfork`, et al, and avoid races with waiting on pids.
The syscall was never completed though--just discussed on the capsicum mailing
list back in 2015:
https://lists.cam.ac.uk/pipermail/cl-capsicum-discuss/2015-May/msg00012.html
. That being said, there are members of the project (@rwatson, etc) who
have longterm goals to implement this syscall to better secure pdfork(2)
calls.

PR: 235871
Approved by: emaste (mentor)
Differential Revision: https://reviews.freebsd.org/D19805

5 years agoMFC r345216:
Enji Cooper [Tue, 9 Apr 2019 16:16:10 +0000 (16:16 +0000)]
MFC r345216:

Remove duplicate `${PACKAGE}FILES+= cleanup.ksh` line

This mutes the duplicate target warning emitted via bsd.files.mk each build.

Approved by: emaste (mentor)
Differential Revision: https://reviews.freebsd.org/D19806

5 years agoMFC r345512: Correct contradictory information on default syslog logging
Michael Gmelin [Tue, 9 Apr 2019 12:28:12 +0000 (12:28 +0000)]
MFC r345512: Correct contradictory information on default syslog logging
priority.

5 years agoMFC r344161: stand: dev_net: correct net_open's interpretation of params
Kyle Evans [Mon, 8 Apr 2019 18:38:18 +0000 (18:38 +0000)]
MFC r344161: stand: dev_net: correct net_open's interpretation of params

net_open previously casted the first vararg to a char * and this was
half-OK: at first, it is passed to netif_open, which would cast it back to
the struct devdesc * that it really is and use it properly. It is then
strdup()d and used as the netdev_name, which is objectively wrong.

Correct it so that the first vararg is properly casted to a struct devdesc *
and the netdev_name gets set properly to make it more clear at a glance that
it's not doing something horribly wrong.

5 years agoMFC r345680: NOTES: Use non-default value for BOOT_TAG
Kyle Evans [Mon, 8 Apr 2019 18:36:47 +0000 (18:36 +0000)]
MFC r345680: NOTES: Use non-default value for BOOT_TAG

5 years agoMFC r343599: libc/tests: Add test case for jemalloc/libthr bug fixed/r343566
Kyle Evans [Mon, 8 Apr 2019 18:34:43 +0000 (18:34 +0000)]
MFC r343599: libc/tests: Add test case for jemalloc/libthr bug fixed/r343566

5 years agoMFC r343065, r343373-r343390, r343477
Kyle Evans [Mon, 8 Apr 2019 18:15:10 +0000 (18:15 +0000)]
MFC r343065, r343373-r343390, r343477

r343065:
With the sync from Dragonfly BSD in r318216 a bug slipped in (also still present
upstream it seems).

The tlv variable was changed to a pointer but the advancement of the data pointer
was left as sizeof(tlv).  While the sizeof the (now) pointer equals the
sizeof 2 x uint32_t (size of the struct) on 64bit platforms, on 32bit platforms
the size of the advancement of the data pointer was wrong leading to
firmware load issues.

Correctly advance the data pointer by the size of the structure and not by
the size of a pointer.

r343373:
if_iwm - Update firmware rs table, instead of indexing the table in tx cmds.

* Rather than providing a non-zero index into the firmware RS table,
we should always use index 0 and update the firmware RS table whenever
our chosen tx rate for data-frames changes.

* Send IWM_LQ_CMD updates when the tx rate gets updated by the net80211
rate control (which is after we tell the tx status to the net80211
rate-control in iwm_mvm_rx_tx_cmd_single()).

* Disregard frames transferred with a different tx rate than the currently
selected rate for the rate-control calculations. This way we avoid
counting management frames (which are sent at a slow, and fixed rate),
as well as frames we added to the tx queue just before a new IWM_LQ_CMD
update took effect.

r343374:
if_iwm - The iwm_prepare_card_hw() in iwm_attach() is only needed on 8K hw.

* Doing the iwm_prepare_card_hw() call in iwm_attach() only on Family 8000
hardware matches the code in Linux iwlwifi.

* While there remove DEFAULT_MAX_TX_POWER definition which is unused, and
has a value different from IWL_DEFAULT_MAX_TX_POWER in iwlwifi.

r343375:
if_iwm - Move iwm_read_firmware() call into iwm_attach().

* We should load the firmware exactly once before the driver really
initializes the hardware the first time, and unload it at detach time.
There is no need to retrieve the firmware during execution of
iwm_mvm_load_ucode_wait_alive(), we should make sure we already have the
firmware data at hand before that.

* The existing sc_preinit_hook code fails to deal with the case where
if_iwm is loaded by the loader (or is statically linked) and the
firmware needs to be loaded from disk. So we can just call
iwm_read_firmware() from iwm_attach() directly.

* A separate solution will have to be added to properly defer the firmware
loading during bootup, until the necessary filesystem is mounted.

r343376:
if_iwm - Check sc->sc_attached flag in suspend/resume callbacks.

* There is (almost) nothing to do in suspend/resume if if_iwm has failed
during initialization (e.g. because of firmware load failure) and was
already uninitialized by iwm_detach_local().

r343377:
iwm - Reduce gratuitous differences with Linux iwlwifi in struct naming.

* Rename some structs and struct members for firmware handling.

r343378:
if_iwm - Update struct iwm_scan_results_notif. Remove old/unused definitions

* Remove outdated notifications IWM_SCAN_ABORT_CMD,
IWM_SCAN_START_NOTIFICATION and IWM_SCAN_RESULTS_NOTIFICATION.

* Remove unused enum iwm_scan_complete_status.

* Use the updated FW Api version 3 of struct iwm_scan_results_notif.

* No functional change, since struct iwm_scan_results_notif is never
accessed in iwm at the moment.

Taken-From: Linux iwlwifi commits 1083fd7391e989be52022f0f338e9dadc048b063
and 75118fdb63496e4611ab50380499ddd62b9de69f.

r343379:
if_iwm - Configure the PCIe LTR, fix PCI express capability accesses.

Taken-From: Linux iwlwifi

r343380:
if_iwm - Add firmware API definitions for TX power commands.

* While there remove unused IWM_UCODE_TLV_CAPA_LMAC_UPLOAD definition,
which isn't defined in iwlwifi.

Taken-From: Linux iwlwifi

r343381:
iwm - Track firmware state better, and improve handling in iwm_newstate().

* This avoids firmware resets in all the cases in iwm_newstate(). Instead
iwm_bring_down_firmware() is called, which tears down all the STA
connection state, according to the sc->sc_firmware_state value.

* Improve the behaviour of the LED blinking a bit, so it only blinks when
there really is a wireless scan going on.

* Print the newstate arg in debug output of iwm_newstate(), to help in
debugging.

This is inspired by the firmware state maintaining change in OpenBSD's iwm,
by stsp@openbsd.org (OpenBSD Git 0ddb056fb7370664b1d4b84392697cb17d1a414a).

r343382:
iwm - Avoid Tx watchdog timeout, when dropping a connection.

r343383:
iwm - Improve firmware Time Event handling.

* This is a mix of the OpenBSD Git 7fd9664469d1b717a307eebd74aeececbd3c41cc
change, and syncing with the Linux iwlwifi code.

Taken-From: Linux iwlwifi, and OpenBSD

r343384:
iwm - Clear Time Event active state, when receiving End Notification.

* This hopefully avoids some firmware panics, I was occasionally seeing,
when iwm disconnects upon losing signal to an access point at some point.

* This is synchronizing the if_iwm_time_event.c file a bit more from the
corresponding Linux iwlwifi/mvm/time-event.c.

Taken-From:     Linux iwlwifi

r343385:
iwm - Always clear watchdog timer, when bringing down firmware state.

r343386:
if_iwm - Stop iwm_watchdog callout when idle.

r343387:
iwm - Fix race during detach, where a callout is left after driver is gone.

r343388:
iwm - Update alive response handling, add v4 and remove old versions.

r343389:
iwm - Remove unused REPLY_MAX

Taken-From: Linux git e4eb275ac5cfe71686612d929a9829345b2a4ada

r343390:
iwm - Remove unused TX_CMD_NEXT_FRAME_*

Taken-From: Linux git b1e06c65fb69c5e3fddcd91987561e225eaa9bfa

r343477:
Fix logic errors in iwm_pcie_load_firmware_chunk introduced in r314065.

 * There's no reason to have a while() loop here, because:
    - if msleep returns 0, that means we were woken up by the interrupt handler,
      and we are going to exit immediately as sc_fw_chunk_done will now be 1
      (there is nothing else that sleeps on sc_fw.)
    - if msleep doesn't return 0 (i.e. it returned ETIMEDOUT) then we will
      exit immediately because of the if-test.
   So, just use a single msleep() and then check sc_fw_chunk_done as before.
 * The comment said we were sleeping for 5 seconds, but the msleep was only
   for 1. Before r314065, this was 1 second and so was the comment,
   and in that commit the comment was changed and the function call wasn't.

Possibly fixes failures to initialize uCode on certain devices.

PR: 219683

5 years agoMFC r343255: awg: fix soft reset failure with no link
Kyle Evans [Mon, 8 Apr 2019 17:59:42 +0000 (17:59 +0000)]
MFC r343255: awg: fix soft reset failure with no link

U-Boot will leave the ephy reset de-asserted and the MAC soft reset will
fail on these boards with internal PHY and no link established. Toggle reset
again before proceeding to attach/init.

5 years agoMFC r343240: iwm(4): Fix possible null pointer indirection
Kyle Evans [Mon, 8 Apr 2019 17:55:04 +0000 (17:55 +0000)]
MFC r343240: iwm(4): Fix possible null pointer indirection

5 years agoMFC r343335, r343977, r343993-r343994, r344034, r344084, r345302, r345769
Kyle Evans [Mon, 8 Apr 2019 17:41:39 +0000 (17:41 +0000)]
MFC r343335, r343977, r343993-r343994, r344034, r344084, r345302, r345769

r343335:
libbe(3): simplify import, allow replication streams

Previously, we directly used libzfs_core's lzc_receive to import to a
temporary snapshot, then cloned the snapshot and setup the properties. This
failed when attempting to import replication streams with questionable
error.

libzfs's zfs_receive is a much better fit here, so we now use it instead
with the destination dataset and let libzfs take care of the dirty details.
be_import is greatly simplified as a result.

r343977:
libbe(3): Add a destroy option for removing the origin

Currently origin snapshots are left behind when a BE is destroyed, whether
it was an auto-created snapshot or explicitly specified via, for example,
`bectl create -e be@mysnap ...`.

Removing it automatically could be argued as a POLA violation in some
circumstances, so provide a flag to be_destroy for it. An accompanying
option will be added to bectl(8) to utilize this.

Some minor style/consistency nits in the affected areas also addressed.

r343993:
bectl(8): Add -o flag to destroy to clean up the origin snapshot of BE

We can't predict when destruction of origin is needed, and currently we have
a precedent for not prompting for things. Leave the decision up to the user
of bectl(8) if they want the origin snapshot to be destroyed or not.

Emits a warning when -o isn't used and an origin snapshot is left to be
cleaned up, for the time being. This is handy when one drops the -o flag but
really did want to clean up the origin.

A couple of -e ignore's have been sprinkled around the test suite for places
that we don't care that the origin's not been cleaned up. -o functionality
tests will be added in the future, but are omitted for now to reduce
conflicts with work in flight to fix bits of the tests.

r343994:
bectl(8): commit missing test modifications from r343993

r344034:
libbe(3): Belatedly note the BE_DESTROY_ORIGIN option added in r343977

r344084:
libbe(3): Fix be_destroy behavior w.r.t. deep BE snapshots and -o

be_destroy is documented to recursively destroy a boot environment.  In the
case of snapshots, one would take this to mean that these are also
recursively destroyed.  However, this was previously not the case.
be_destroy would descend into the be_destroy callback and attempt to
zfs_iter_children on the top-level snapshot, which is bogus.

Our alternative approach is to take note of the snapshot name and iterate
through all of fs children of the BE to try destruction in the children.

The -o option is also fixed to work properly with deep BEs.  If the BE was
created with `bectl create -e otherDeepBE newDeepBE`, for instance, then a
recursive snapshot of otherDeepBE would have been taken for construction of
newDeepBE but a subsequent destroy with BE_DESTROY_ORIGIN set would only
clean up the snapshot at the root of otherDeepBE: ${BEROOT}/otherDeepBE@...

The most recent iteration instead pretends not to know how these things
work, verifies that the origin is another BE and then passes that back
through be_destroy to DTRT when snapshots and deep BEs may be in play.

r345302:
bectl(8): change jail command to execute jail(8)

The jail(8) command provides a variety of jail pseudo-parameters that are
useful to consumers of bectl, mount.devfs being the most-often-requested
paramater by bectl users.

command, exec.start, nopersist, and persist may not be specified via -o to
bectl. The command/exec.start remains passed as it always has at the end of
bectl, and persistence is dictated by -b/-U bectl jail arguments.

r345769:
libbe: Fix zfs_is_mounted check w/ snapshots

'be_destroy' can destroy a boot environment (by name) or a given snapshot.
If the target to be destroyed is a dataset, check if it's mounted. We don't
want to check if the origin dataset is mounted when destroying a snapshot.

PR: 236043

5 years agoMFC r345848: libbe(3): Add a serial to the generated snapshot names
Kyle Evans [Mon, 8 Apr 2019 17:36:24 +0000 (17:36 +0000)]
MFC r345848: libbe(3): Add a serial to the generated snapshot names

To use bectl in an example, when one creates a new boot environment with
either `bectl create <be>` or `bectl create -e <otherbe> <be>`, libbe will
take a snapshot of the original boot environment to clone. Previously, this
used %F-%T date format as the snapshot name, but this has some limitations-
attempting to create multiple boot environments in quick succession may
collide if done within the same second.

Tack a serial onto it to reduce the chances of a collision... we could still
collide if multiple processes/threads are creating boot environments at the
same time, but this is likely not a big concern as this has only been
reported as occurring in freebsd-ci setup.

5 years agoMFC r345763:
Andrey V. Elsukov [Mon, 8 Apr 2019 11:53:37 +0000 (11:53 +0000)]
MFC r345763:
  Correct a port number assignment.

  PR: 236930

5 years agoMFC r345741:
Jason A. Harmening [Sun, 7 Apr 2019 19:02:33 +0000 (19:02 +0000)]
MFC r345741:

freebsd32: fix padding of computed control message length for recvmsg()

Each control message region must be aligned on a 4-byte boundary on 32-bit
architectures. The 32-bit compat shim for recvmsg() gets the actual layout
right, but doesn't pad the payload length when computing msg_controllen for
the output message header. If a control message contains an unaligned
payload, such as the 1-byte TTL field in the example attached to PR 236737,
this can produce control message payload boundaries that extend beyond
the boundary reported by msg_controllen.

PR: 236737

5 years agoMFC r345754:
Andriy Voskoboinyk [Sun, 7 Apr 2019 13:26:45 +0000 (13:26 +0000)]
MFC r345754:
run(4): properly set F_DATAPAD radiotap flag if frame has padding between
frame header and data.

This will fix 'Mysterious OLPC stuff' for received frames and wrong
CCMP / TKIP / data decoding for transmitted frames in net/wireshark
dissector.

While here, drop unneeded comment - net80211 handles padding requirements
for Tx & Rx without driver adjustment.

Was tested with D-Link DWA-140 rev B3, STA mode.

5 years agoMFC r345751:
Andriy Voskoboinyk [Sun, 7 Apr 2019 13:11:40 +0000 (13:11 +0000)]
MFC r345751:
uath(4), urtw(4): restart driver if device does not respond after Tx request

5 years agoMFC r345753:
Andriy Voskoboinyk [Sun, 7 Apr 2019 13:04:25 +0000 (13:04 +0000)]
MFC r345753:
run(4): do not clear PROTECTED bit if frame was not decrypted by NIC.

Was tested with D-Link DWA-140 rev B3, STA / MONITOR modes.

5 years agoMFC r345729:
Andriy Voskoboinyk [Sun, 7 Apr 2019 12:57:38 +0000 (12:57 +0000)]
MFC r345729:
urtw(4): export TSF timestamp for received frames via radiotap

Was tested with Netgear WG111 v3 (RTL8187B), STA mode.

5 years agoAdd _PC_ACL_* to vop_stdpathconf
Simon J. Gerraty [Fri, 5 Apr 2019 23:34:46 +0000 (23:34 +0000)]
Add _PC_ACL_* to vop_stdpathconf

This avoid EINVAL from tmpfs etc.

Merge of r345024

Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D19512

5 years agoMFC r345816:
Guangyuan Yang [Fri, 5 Apr 2019 18:17:11 +0000 (18:17 +0000)]
MFC r345816:

Correct SMC definition in asmc(4) man page.

PR: 236954
Submitted by: fbsdbugs4@sentry.org

5 years agoMFC r345807:
Dimitry Andric [Fri, 5 Apr 2019 16:12:31 +0000 (16:12 +0000)]
MFC r345807:

Fix regression in top(1) after r344381, causing informational messages
to no longer be displayed.  This was because the reimplementation of
setup_buffer() did not copy the previous contents into any reallocated
buffer.

Reported by: James Wright <james.wright@jigsawdezign.com>
PR: 236947

5 years agoMFC r345806:
Dimitry Andric [Fri, 5 Apr 2019 16:09:23 +0000 (16:09 +0000)]
MFC r345806:

Pull in r357362 from upstream clang trunk (by David Chisnall):

  [objc-gnustep] Use .init_array not .ctors when requested.

  This doesn't make a difference most of the time but FreeBSD/ARM
  doesn't run anything in the .ctors array.

This should help with updating the libobjc2 port for armv7.

Requested by: theraven
Upstream PR: https://github.com/gnustep/libobjc2/issues/83

5 years agoMFC r345633:
Hans Petter Selasky [Fri, 5 Apr 2019 11:38:34 +0000 (11:38 +0000)]
MFC r345633:
Add new USB PCI ID.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
Sponsored by: Mellanox Technologies

5 years agoMFC r345499:
Hans Petter Selasky [Fri, 5 Apr 2019 11:35:02 +0000 (11:35 +0000)]
MFC r345499:
Change all kernel C-type macros into static inline functions.

The current kernel C-type macros might obscurely hide the fact that
the input argument might be used multiple times.

This breaks code like:
isalpha(*ptr++)

Use static inline functions instead of macros to fix this.

Reviewed by: kib @
Differential Revision: https://reviews.freebsd.org/D19694
Sponsored by: Mellanox Technologies

5 years agoMFC r345109:
Hans Petter Selasky [Fri, 5 Apr 2019 11:33:11 +0000 (11:33 +0000)]
MFC r345109:
Implement sg_virt() function in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Limelight Networks
Sponsored by: Mellanox Technologies

5 years agoMFC r345108:
Hans Petter Selasky [Fri, 5 Apr 2019 11:31:37 +0000 (11:31 +0000)]
MFC r345108:
Define SG_CHAIN and SG_END in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Limelight Networks
Sponsored by: Mellanox Technologies

5 years agoMFC r345107:
Hans Petter Selasky [Fri, 5 Apr 2019 11:30:13 +0000 (11:30 +0000)]
MFC r345107:
Implement pr_info_ratelimited() function macro in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Limelight Networks
Sponsored by: Mellanox Technologies

5 years agoMFC r345106:
Hans Petter Selasky [Fri, 5 Apr 2019 11:28:50 +0000 (11:28 +0000)]
MFC r345106:
Define some RCU debug macros in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Limelight Networks
Sponsored by: Mellanox Technologies

5 years agoMFC r345105:
Hans Petter Selasky [Fri, 5 Apr 2019 11:27:48 +0000 (11:27 +0000)]
MFC r345105:
Honor SYSCTL function return values when creating sysfs nodes in the LinuxKPI.
Return proper error code upon failure.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Limelight Networks
Sponsored by: Mellanox Technologies

5 years agoMFC r345104:
Hans Petter Selasky [Fri, 5 Apr 2019 11:26:18 +0000 (11:26 +0000)]
MFC r345104:
Implement more malloc function macros in the LinuxKPI.
Fix arguments for currently unused kvmalloc().

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Limelight Networks
Sponsored by: Mellanox Technologies

5 years agoMFC r345101:
Hans Petter Selasky [Fri, 5 Apr 2019 11:24:14 +0000 (11:24 +0000)]
MFC r345101:
Implement si_meminfo() in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Limelight Networks
Sponsored by: Mellanox Technologies

5 years agoMFC r345099:
Hans Petter Selasky [Fri, 5 Apr 2019 11:20:44 +0000 (11:20 +0000)]
MFC r345099:
Implement get_task_comm() in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Limelight Networks
Sponsored by: Mellanox Technologies

5 years agoMFC r345098:
Hans Petter Selasky [Fri, 5 Apr 2019 11:19:07 +0000 (11:19 +0000)]
MFC r345098:
Implement current_exiting() in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Limelight Networks
Sponsored by: Mellanox Technologies

5 years agoMFC r345097:
Hans Petter Selasky [Fri, 5 Apr 2019 11:17:12 +0000 (11:17 +0000)]
MFC r345097:
Implement list_for_each_entry_from_reverse() and
list_bulk_move_tail() in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Limelight Networks
Sponsored by: Mellanox Technologies

5 years agoMFC r345096:
Hans Petter Selasky [Fri, 5 Apr 2019 11:15:48 +0000 (11:15 +0000)]
MFC r345096:
Implement dma_map_page_attrs() in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Limelight Networks
Sponsored by: Mellanox Technologies

5 years agoMFC r345095 and r345110:
Hans Petter Selasky [Fri, 5 Apr 2019 11:14:27 +0000 (11:14 +0000)]
MFC r345095 and r345110:
Implement ida_free() and ida_alloc_max() in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Limelight Networks
Sponsored by: Mellanox Technologies

5 years agoMFC r345094:
Hans Petter Selasky [Fri, 5 Apr 2019 11:11:20 +0000 (11:11 +0000)]
MFC r345094:
Implement DEFINE_STATIC_SRCU() function macro in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Limelight Networks
Sponsored by: Mellanox Technologies

5 years agoMFC r345093:
Hans Petter Selasky [Fri, 5 Apr 2019 11:10:09 +0000 (11:10 +0000)]
MFC r345093:
Implement BITS_PER_TYPE() function macro in the LinuxKPI.
Fix some style while at it.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Limelight Networks
Sponsored by: Mellanox Technologies

5 years agoMFC r345092:
Hans Petter Selasky [Fri, 5 Apr 2019 11:08:50 +0000 (11:08 +0000)]
MFC r345092:
Properly define the DMA attribute values in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Limelight Networks
Sponsored by: Mellanox Technologies

5 years agoMFC r345091:
Hans Petter Selasky [Fri, 5 Apr 2019 11:07:15 +0000 (11:07 +0000)]
MFC r345091:
Implement dev_err_once() function macro in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Limelight Networks
Sponsored by: Mellanox Technologies

5 years agoMFC r345090:
Hans Petter Selasky [Fri, 5 Apr 2019 11:06:15 +0000 (11:06 +0000)]
MFC r345090:
Implement dma_set_mask_and_coherent() in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Limelight Networks
Sponsored by: Mellanox Technologies

5 years agoMFC r345400-345401,345403,345412,345437:
Cy Schubert [Fri, 5 Apr 2019 01:22:30 +0000 (01:22 +0000)]
MFC r345400-345401,345403,345412,345437:

Add rc.d support for ippool(8).

I've been using ippool at my site for approximately two years. It's
about time this was committed.

PR: 218433

5 years agoMFC r344243, r345517-r345518: lualoader: More intelligent screen clearing
Kyle Evans [Thu, 4 Apr 2019 17:29:43 +0000 (17:29 +0000)]
MFC r344243, r345517-r345518: lualoader: More intelligent screen clearing

r344243:
lualoader: only clear the screen before first password prompt

This was previously an unconditional screen clear, regardless of whether or
not we would be prompting for any passwords. This is pointless, given that
the screen clear is only there to put our screen into a consistent state
before we draw the prompts and do cursor manipulation.

This is also the only screen clear besides that to draw the menu.  One can
now see early pre-loader and loader output with the menu disabled, which may
be useful for diagnostics.

r345517:
lualoader: Clear the screen before prompting for password

Assuming that the autoboot sequence was interrupted, we've done enough
cursor manipulation that the prompt for the password will be sufficiently
obscured a couple of lines up. Clear the screen and reset the cursor
position here, too.

r345518:
lualoader: Fix up some luacheck concerns

- Garbage collect an unused (removed because it was useless) constant
- Don't bother with vararg notation if args will not be used

5 years agodtc(1): Update to 1a79f5f26631
Kyle Evans [Thu, 4 Apr 2019 17:26:35 +0000 (17:26 +0000)]
dtc(1): Update to 1a79f5f26631

Highlights:
- Bugfix for order in which /delete-node/ and /delete-property/ are
  processed [0]
- /omit-if-no-ref/ support has been added (used only by U-Boot at this
  point, in theory)
- GPL dtc compat version bumped to 1.4.7
- Various small fixes and compatibility improvements

5 years agoMFC r345516: netbsd-tests: import memory bump for libc/regex/t_exhaust
Kyle Evans [Thu, 4 Apr 2019 17:24:57 +0000 (17:24 +0000)]
MFC r345516: netbsd-tests: import memory bump for libc/regex/t_exhaust

5 years agoMFC r344677: patch(1): Exit successfully if we're fed a 0-length patch
Kyle Evans [Thu, 4 Apr 2019 17:21:30 +0000 (17:21 +0000)]
MFC r344677: patch(1): Exit successfully if we're fed a 0-length patch

This change is made in the name of GNU patch compatibility. If GNU patch is
fed a zero-length patch, it will exit successfully with no output. This is
used in at least one port to date (comms/wsjtx), and we break on this usage.

It seems unlikely that anyone relies on patch(1) calling their completely
empty patch garbage and failing, and GNU compatibility is a plus if it helps
with porting, so make the switch.

5 years agoMFC r345373: Add bus_release_resource() method to nexus on arm64
Marcin Wojtas [Thu, 4 Apr 2019 12:02:48 +0000 (12:02 +0000)]
MFC r345373: Add bus_release_resource() method to nexus on arm64

Submitted by: Michal Krawczyk <mk@semihalf.com>
Obtained from: Semihalf
Sponsored by: Amazon, Inc.

5 years agoMFC r345371: Prevent double activation of admin interrupt in ENA
Marcin Wojtas [Thu, 4 Apr 2019 09:08:09 +0000 (09:08 +0000)]
MFC r345371: Prevent double activation of admin interrupt in ENA

Submitted by: Michal Krawczyk <mk@semihalf.com>
Obtained from: Semihalf
Sponsored by: Amazon, Inc.

5 years agoMFC r345359, r345384:
Mark Johnston [Thu, 4 Apr 2019 02:05:50 +0000 (02:05 +0000)]
MFC r345359, r345384:
Don't attempt to measure TSC skew when running as a VM guest.

PR: 218452

5 years agoMFC r343764 (jchandra): arm, acpi: increase size of memory region arrays
Ed Maste [Wed, 3 Apr 2019 13:19:47 +0000 (13:19 +0000)]
MFC r343764 (jchandra): arm, acpi: increase size of memory region arrays

Bump up MAX_HWCNT and MAX_EXCNT to 32 when ACPI is enabled. These are
the sizes of the hwregions and exregions arrays respectively. ACPI
firmware typically has more memory regions and the current value of
16 is not sufficient for some platforms.

This commit fixes a failure seen with AMI firmware on Cavium's Sabre
ThunderX2 reference platform. This platform needs 21 physical memory
regions and 18 excluded regions to boot correctly with the current
firmware release.

5 years agoMFC r345611:
Ravi Pokala [Wed, 3 Apr 2019 06:36:41 +0000 (06:36 +0000)]
MFC r345611:

Teach jedec_dimm(4) to be more forgiving of non-fatal errors.

It looks like some DIMMs claim to have a TSOD, but actually don't. Some
claim they weren't able to change the SPD page, but they did. Neither of
those should be fatal errors.

5 years agoMFC r345457:
Ravi Pokala [Wed, 3 Apr 2019 03:30:14 +0000 (03:30 +0000)]
MFC r345457:

Add descriptions for sysctls in kern_mib.c and sysctl.3 which lack them.

r343532 noted the difference between "hw.realmem" and "hw.physmem", which I
was previously unaware of. I discovered that neither sysctl had a
description visible via `sysctl -d', so I found where they were defined and
added suitable descriptions. While in the file, I went ahead and added
descriptions for all the others which lacked them. I also updated sysctl.3
accordingly.

5 years agoMFC r345332: Tune chipset naming.
Alexander Motin [Wed, 3 Apr 2019 01:30:38 +0000 (01:30 +0000)]
MFC r345332: Tune chipset naming.

5 years agoMFC r345333: Add some Cannon Lake chipset IDs.
Alexander Motin [Wed, 3 Apr 2019 01:29:30 +0000 (01:29 +0000)]
MFC r345333: Add some Cannon Lake chipset IDs.

5 years agoMFC r344280: freebsd-update: Clarify help text
Ed Maste [Tue, 2 Apr 2019 13:57:52 +0000 (13:57 +0000)]
MFC r344280: freebsd-update: Clarify help text

Improve help text to include example release numbers for reference
and clarify the -F option.

PR: 231185, 214619
Submitted by: Gerald Aryeetey <aryeeteygerald_rogers.com>
Reviewed by: delphij, rgrimes
Sponsored by: The FreeBSD Foundation

5 years agoMFC r345292:
Andrey V. Elsukov [Tue, 2 Apr 2019 09:31:38 +0000 (09:31 +0000)]
MFC r345292:
  Convert allocation of bpf_if in bpfattach2 from M_NOWAIT to M_WAITOK
  and remove possible panic condition.

  It is already allowed to sleep in bpfattach[2], since BPF_LOCK was
  converted to SX lock in r332388. Also move KASSERT() to the top of
  function and make full initialization before bpf_if will be linked
  to BPF's list of interfaces.

5 years agoMFC r344676: Prevent detaching driver if the attach is not finished
Marcin Wojtas [Tue, 2 Apr 2019 08:35:24 +0000 (08:35 +0000)]
MFC r344676: Prevent detaching driver if the attach is not finished

Submitted by: Rafal Kozik <rk@semihalf.com>
Obtained from: Semihalf
Sponsored by: Amazon, Inc.

5 years agoFix if_(m)addr_rlock().
Mark Johnston [Mon, 1 Apr 2019 14:19:09 +0000 (14:19 +0000)]
Fix if_(m)addr_rlock().

The use of a per-ifnet epoch context meant that these KPIs were not
reentrant.  This was fixed in head in r340413, but the change cannot
be MFCed because it breaks the KBI by modifying struct thread.  This
is a direct commit to stable/12 which uses a per-CPU mutex to fix
the problem without changing the KBI.

PR: 236846
Submitted by: hselasky
Reported and tested by: Viktor Dukhovni <ietf-dane@dukhovni.org>
Reviewed by: hselasky (previous version)
Differential Revision: https://reviews.freebsd.org/D19764

5 years agoMFC r345269, r345323
Vincenzo Maffione [Mon, 1 Apr 2019 10:51:24 +0000 (10:51 +0000)]
MFC r345269, r345323

netmap: add support for multiple host rings

Some applications forward from/to host rings most or all the
traffic received or sent on a physical interface. In this
cases it is desirable to have more than a pair of RX/TX host
rings, and use multiple threads to speed up forwarding.
This change adds support for multiple host rings. On registering
a netmap port, the user can specify the number of desired receive
and transmit host rings in the nr_host_tx_rings and nr_host_rx_rings
fields of the nmreq_register structure.

5 years agoMFC r345252:
Andriy Voskoboinyk [Mon, 1 Apr 2019 07:54:27 +0000 (07:54 +0000)]
MFC r345252:
net80211: correct check for SMPS node flags updates

Update node flags when driver supports SMPS, not when it is disabled or
in dynamic mode ((iv_htcaps & HTCAP_SMPS) != 0).

Was checked with RTL8188EE (1T1R), STA mode - 'smps' word should disappear
from 'ifconfig wlan0' output.

5 years agoMFC r345493:
Andriy Voskoboinyk [Sun, 31 Mar 2019 11:31:01 +0000 (11:31 +0000)]
MFC r345493:
run(4): merge some common TSF-related code into run_disable_tsf()

No functional change intended.

5 years agoMFC r345596:
Mark Johnston [Sat, 30 Mar 2019 17:42:27 +0000 (17:42 +0000)]
MFC r345596:
Fix pidfile_open(3) to handle relative paths with multiple components.

5 years agoMFC r345620:
Konstantin Belousov [Sat, 30 Mar 2019 10:04:42 +0000 (10:04 +0000)]
MFC r345620:
rtld: disable relro enforcement for irelative relocation processing.

5 years agoMFC r345452:
Konstantin Belousov [Sat, 30 Mar 2019 10:03:26 +0000 (10:03 +0000)]
MFC r345452:
ASLR: check for max_addr after applying randomization, not before.

5 years agoMFC r345177:
Kristof Provost [Fri, 29 Mar 2019 14:34:51 +0000 (14:34 +0000)]
MFC r345177:

pf :Use counter(9) in pf tables.

The counters of pf tables are updated outside the rule lock. That means state
updates might overwrite each other. Furthermore allocation and
freeing of counters happens outside the lock as well.

Use counter(9) for the counters, and always allocate the counter table
element, so that the race condition cannot happen any more.

PR: 230619
Submitted by: Kajetan Staszkiewicz <vegeta@tuxpowered.net>

5 years agoMFC r345560:
Mark Johnston [Fri, 29 Mar 2019 13:37:29 +0000 (13:37 +0000)]
MFC r345560:
Add CTLFLAG_VNET to the net.inet.icmp.tstamprepl definition.

5 years agoMFC r345005:
Kurt Lidl [Fri, 29 Mar 2019 13:03:05 +0000 (13:03 +0000)]
MFC r345005:
Remove an unneeded 'tail -n 1' from a pipeline in growfs rc script

5 years agoMFC r345178:
Kristof Provost [Fri, 29 Mar 2019 11:59:53 +0000 (11:59 +0000)]
MFC r345178:

bridge: Fix panic if the STP root is removed

If the spanning tree root interface is removed from the bridge we panic
on the next 'ifconfig'.
While the STP code is notified whenever a bridge member interface is
removed from the bridge it does not clear the bs_root_port. This means
bs_root_port can still point at an bridge_iflist which has been free()d.
The next access to it will panic.

Explicitly check if the interface we're removing in bstp_destroy() is
the root, and if so re-assign the roles, which clears bs_root_port.

Reviewed by: philip

5 years agoMFC r345526:
Philip Paeps [Fri, 29 Mar 2019 01:50:16 +0000 (01:50 +0000)]
MFC r345526:

SZ has been known as Eswatini since April 2018 (formerly Swaziland).

5 years agoMFC r345524: Import tzdata 2019a
Philip Paeps [Fri, 29 Mar 2019 01:39:20 +0000 (01:39 +0000)]
MFC r345524: Import tzdata 2019a

5 years agoMFC of 343536, 345077, and 345352
Kirk McKusick [Fri, 29 Mar 2019 01:15:37 +0000 (01:15 +0000)]
MFC of 343536, 345077, and 345352

Collectively fixing ffs_truncate3 and dangling dependencies panics
when using ACLs.

Sponsored by: Netflix

5 years agoMFC r339683:
Ravi Pokala [Thu, 28 Mar 2019 22:19:09 +0000 (22:19 +0000)]
MFC r339683:
Remove redundant redeclaration of netmap_vp_reg().
This should unbreak sparc64 and powerpc LINT builds.

Sponsored by: Panasas

5 years agoMFC r345376:
Konstantin Belousov [Thu, 28 Mar 2019 13:42:37 +0000 (13:42 +0000)]
MFC r345376:
nullfs: fix unmounts when filesystem is active.

5 years agoMFC r344990:
Andriy Voskoboinyk [Thu, 28 Mar 2019 09:16:00 +0000 (09:16 +0000)]
MFC r344990:
Fix ieee80211_radiotap(9) usage in wireless drivers:

- Alignment issues:
 * Add missing __packed attributes + padding across all drivers; in
most places there was an assumption that padding will be always
minimally suitable; in few places - e.g., in urtw(4) / rtwn(4) -
padding was just missing.
 * Add __aligned(8) attribute for all Rx radiotap headers since they can
contain 64-bit TSF timestamp; it cannot appear in Tx radiotap headers, so
just drop the attribute here. Refresh ieee80211_radiotap(9) man page
accordingly.

- Since net80211 automatically updates channel frequency / flags in
ieee80211_radiotap_chan_change() drop duplicate setup for these fields
in drivers.

5 years agoMFC: r344248,r344387
Toomas Soome [Thu, 28 Mar 2019 08:38:31 +0000 (08:38 +0000)]
MFC: r344248,r344387

cd9660: dirmatch fails to unmatch when name is prefix for directory record

Loader does fail to properly match the file name in directory record and
does open file based on prefix match.

The cd9660_open() does pass whole path to dirmatch() and we need to
compare only the current path component, not full path.

Additinally, skip over duplicate / (if any) and check if the last component
in the path was meant to be directory (having trailing /). If it is in fact
a file, error out.

5 years agoMFC r344654, r345334.
Navdeep Parhar [Wed, 27 Mar 2019 22:51:48 +0000 (22:51 +0000)]
MFC r344654, r345334.

r344654:
cxgbe(4): Request high priority filter support explicitly, as required
by recent firmwares.

Sponsored by: Chelsio Communications

r345334:
cxgbe(4): Treat the viid as an opaque identifier.

Recent firmwares prefer to use a different format for viid internally
and this change allows them to do so.

Sponsored by: Chelsio Communications

5 years agoMFC r340651, r343264, r343269, and r345083.
Navdeep Parhar [Wed, 27 Mar 2019 22:42:18 +0000 (22:42 +0000)]
MFC r340651, r343264, r343269, and r345083.

r340651:
cxgbe(4): Update T4/5/6 firmwares to 1.22.0.3.

Obtained from: Chelsio Communications
Sponsored by: Chelsio Communications

r343264:
cxgbe(4): Use a truncated firmware header for version checks.  All the
version numbers are towards the begining of the header.

Sponsored by: Chelsio Communications

r343269:
cxgbe(4): Allow negative values in hw.cxgbe.fw_install and take them to
mean that the driver should taste the firmware in the KLD and use that
firmware's version for all its fw_install checks.

The driver gets firmware version information from compiled-in values by
default and this change allows custom (or older/newer) firmware modules
to be used with the stock driver.

There is no change in default behavior.

Sponsored by: Chelsio Communications

r345083:
cxgbe(4): Update T4/5/6 firmwares to 1.23.0.0.

Obtained from: Chelsio Communications
Sponsored by: Chelsio Communications

5 years agoMFC r344519, r344682, and r344719.
Navdeep Parhar [Wed, 27 Mar 2019 22:27:25 +0000 (22:27 +0000)]
MFC r344519, r344682, and r344719.

r344519:
cxgbe(4): Use correct port_info in the call to is_bt().

This fixes a panic during configuration if the tx channel of a port
isn't the same as its port id.

Reported by: Fabrice Bruel
Sponsored by: Chelsio Communications

r344682:
cxgbe(4): Don't forget to report link state to the kernel if the link is
already up at attach.

Reported by: Fabrice Bruel @ Orange Business Service
Sponsored by: Chelsio Communications

r344719:
cxgbev(4): Enable 32b port capabilities in the VF driver.

Sponsored by: Chelsio Communications

5 years agoMFC r344524:
Navdeep Parhar [Wed, 27 Mar 2019 22:21:09 +0000 (22:21 +0000)]
MFC r344524:

cxgbe(4): Updates to the default and hashfilter configurations.

- Do not use nvf = 4 as it is not really supported by the firmware.
  Firmwares 1.23.3.0 and above will ignore it silently.
- Increase PF4's share of the VIs and let it use all of the RSS table.

Sponsored by: Chelsio Communications

5 years agoMFC r341620:
Navdeep Parhar [Wed, 27 Mar 2019 22:05:57 +0000 (22:05 +0000)]
MFC r341620:

cxgbe(4): Fall back to a basic configuration in case of any error during
card initialization.  This is an expanded version of r333682.

Break up prep_firmware into simpler routines while here.  Load the
firmware/config KLD only if needed.

Sponsored by: Chelsio Communications

5 years agoMFC r343889:
Navdeep Parhar [Wed, 27 Mar 2019 21:58:48 +0000 (21:58 +0000)]
MFC r343889:

cxgbev(4): Initialize debug_flags from the environment like in the PF driver.

5 years agoMFC r343539:
Navdeep Parhar [Wed, 27 Mar 2019 21:55:36 +0000 (21:55 +0000)]
MFC r343539:

cxgbe(4): Add adapter information to messages logged by the OS-agnostic
code in t4_hw.c.

Sponsored by: Chelsio Communications

5 years agoMFC r344306: sh: Send normal output from bind builtin to stdout
Jilles Tjoelker [Wed, 27 Mar 2019 21:53:44 +0000 (21:53 +0000)]
MFC r344306: sh: Send normal output from bind builtin to stdout

PR: 233343

5 years agoMFC r343233:
Navdeep Parhar [Wed, 27 Mar 2019 21:50:07 +0000 (21:50 +0000)]
MFC r343233:

cxgbe(4): Clear the reply-pending status of a hashfilter when the reply
indicates an error.  Also, do not remove it twice from the hf list in
this case.

Submitted by: Krishnamraju Eraparaju @ Chelsio
Sponsored by: Chelsio Communicatons

5 years agoMFC r342954:
Navdeep Parhar [Wed, 27 Mar 2019 21:46:45 +0000 (21:46 +0000)]
MFC r342954:

cxgbe(4): Move some INTx specific code to a more appropriate place.

5 years agoMFC r342356:
Navdeep Parhar [Wed, 27 Mar 2019 21:45:30 +0000 (21:45 +0000)]
MFC r342356:

Remove unused macros from t4_tom.h.

5 years agoMFC r342284:
Navdeep Parhar [Wed, 27 Mar 2019 21:43:38 +0000 (21:43 +0000)]
MFC r342284:

cxgbe(4): Make sure the rx queues start off with the correct timestamp
settings on initialization.

Sponsored by: Chelsio Communications

5 years agoMFC r342758:
Navdeep Parhar [Wed, 27 Mar 2019 21:38:18 +0000 (21:38 +0000)]
MFC r342758:

cxgbe(4): Clear FW_OK if the firmware reports an error.

Sponsored by: Chelsio Communications

5 years agoMFC r342234:
Navdeep Parhar [Wed, 27 Mar 2019 21:34:13 +0000 (21:34 +0000)]
MFC r342234:

cxgbe(4): Do not issue mbox commands after t4_fw_bye.

Sponsored by: Chelsio Communications

5 years agoMFC r342208:
Navdeep Parhar [Wed, 27 Mar 2019 21:29:45 +0000 (21:29 +0000)]
MFC r342208:

cxgbe/t4_tom: fixes for issues on the passive open side.

- Fix PR 227760 by getting the TOE to respond to the SYN after the call
  to toe_syncache_add, not during it.  The kernel syncache code calls
  syncache_respond just before syncache_insert.  If the ACK to the
  syncache_respond is processed in another thread it may run before the
  syncache_insert and won't find the entry.  Note that this affects only
  t4_tom because it's the only driver trying to insert and expand
  syncache entries from different threads.

- Do not leak resources if an embryonic connection terminates at
  SYN_RCVD because of L2 lookup failures.

- Retire lctx->synq and associated code because there is never a need to
  walk the list of embryonic connections associated with a listener.
  The per-tid state is still called a synq entry in the driver even
  though the synq itself is now gone.

PR: 227760
Sponsored by: Chelsio Communications

5 years agoMFC r341172, r341270 (both by jhb@).
Navdeep Parhar [Wed, 27 Mar 2019 21:22:59 +0000 (21:22 +0000)]
MFC r341172, r341270 (both by jhb@).

r341172:
Move CLIP table handling out of TOM and into the base driver.

- Store the clip table in 'struct adapter' instead of in the TOM softc.
- Init the clip table during attach and teardown during detach.
- While here, add a dev.<nexus>.<unit>.misc.clip sysctl to dump the
  CLIP table.

This does mean that we update the clip table even if TOE is not enabled,
but non-TOE things need the CLIP table anyway.

Reviewed by: np, Krishnamraju Eraparaju @ Chelsio
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D18010

r341270:
Make most of the CLIP code conditional on #ifdef INET6.

This fixes builds of kernels without INET6 such as LINT-NOINET6.

Reported by: arybchik
Reviewed by: np
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D18384