After the clang/llvm version 11 import LLD_VERSION is no longer used
upstream so Version.inc now only defines LLD_VERSION_STRING.
This breaks the WANT_LINKER_VERSION magic and might lead to us building
more than needed (e.g., for croos-tools).
Change the awk script to parse LLD_VERSION_STRING instead of LLD_VERSION,
which not only unbreaks the current situation but should also be backwards
compatible as dim points out.
Merging this before r364284 will ensure that stable/12 won't break.
PR: 248818
Reviewed by: emaste, dim (seems right and the way to go)
r362736:
Configure rx_delay/tx_delay values for RK3399/RK3328 GMAC
For 1000Mb mode to work reliably TX/RX delays need to be configured
between the TX/RX clock and the respective signals on the PHY
to compensate for differing trace lengths on the PCB.
Reviewed by: manu
r364088:
Improve Rockchip's integration of if_dwc
- Do not rely on U-Boot for clocks configuration, enable and set frequencies
in the driver's attach method.
- Adjust MAC settings according to detected linespeed on RK3399 and RK3328.
- Add support for RMII PHY mode on RK3328.
Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D26006
r360467 by mmel:
Fix style(9). Strip write only variables.
Not a functional change.
r362399 by mmel:
Use naming nomenclature used in DesignWare TRM.
Use naming nomenclature used in DesignWare TRM.
This driver was written by using Altera (now Intel) documentation for Arria
FPGA manual. Unfortunately this manual used very different (and in some cases
opposite naming) for registers and descriptor fields. Unfortunately,
this makes future expansion extremely hard.
Should not been functional change.
r362405 by mmel:
Finish renaming in if_dwc.
By using DWC TRM terminology, normal descriptor format should be named
extended and alternate descriptor format should be named normal.
Should not been functional change.
r362415 by mmel:
Improve if_dwc:
- refactorize packet receive path. Make sure that we don't leak mbufs
and/or that we don't create holes in RX descriptor ring
- slightly simplify handling with TX descriptors
Add glue driver for Altera SOCFPGA Ethernet MAC (EMAC) found in
Terasic DE10-Pro (an Intel Stratix 10 GX/SX FPGA Development Kit).
The Altera EMAC is an instance of Synopsys DesignWare Gigabit MAC.
This driver sets correct clock range for MDIO interface on Intel Stratix 10
platform.
This is required due to lack of support for clock manager device for
this platform that could tell us the clock frequency value for ethernet
clock domain.
Provide new KPI for network drivers to access lists of interface
addresses. The KPI doesn't reveal neither how addresses are stored,
how the access to them is synchronized, neither reveal struct ifaddr
and struct ifmaddr.
In Linux, ksize() gets the actual amount of memory allocated for a given
object. This commit adds malloc_usable_size() to FreeBSD KPI which does
the same. It also maps LinuxKPI ksize() to newly created function.
Marcin Wojtas [Sun, 6 Sep 2020 14:41:35 +0000 (14:41 +0000)]
MFC: Merge ENA v2.2.0 driver
r361530 Update ENA driver version to v2.2.0
r361529 Refactor ena_tx_map_mbuf() function
r361528 Fix double-free bug within ena_detach()
r361527 Allow disabling meta caching for ENA Tx path
r361526 Create ENA IO queues with optional backoff
r361525 Add sysctl node for ENA IO queues number adjustment
r361524 Fix assumptions about number of IO queues in the ENA
r361523 Rework ENA Tx buffer ring size reconfiguration
r361521 Rework ENA Rx queue size configuration
r361518 Improve indentation in ena_up() and ena_down()
r361517 Expose argument names for non static ENA driver functions
r361516 Use single global lock in the ENA driver
r361515 Add trigger reset function in the ENA driver
r361514 Provide ENA driver version in a sysctl node
r361513 Remove unused argument from static function in ena.c
r361512 Enable Tx drops reporting in the ENA driver
r361511 Adjust ENA driver to the new HAL
r358289 Rework and simplify Tx DMA mapping in ENA
Obtained from: Semihalf
Sponsored by: Amazon, Inc.
Marcin Wojtas [Sun, 6 Sep 2020 14:23:31 +0000 (14:23 +0000)]
MFC: ENA netmap support and bug fixes
r363638 Fix ENA build when integrated into kernel
r354242 Make valdiate_rx_req_id static inline because it uses other static
r354225 Update ENA version to v2.1.0
r354224 Add support for ENA NETMAP partial initialization
r354223 Add support for ENA NETMAP Tx
r354222 Add support for ENA NETMAP Rx
r354221 Introduce NETMAP support in ENA
r354220 Split Rx/Tx from initialization code in ENA driver
r354219 Fix ENA keep-alive timeout due to prolonged reset
r354218 Add WC support for arm64 in the ENA driver
Obtained from: Semihalf
Sponsored by: Amazon, Inc.
Marcin Wojtas [Sun, 6 Sep 2020 14:13:51 +0000 (14:13 +0000)]
MFC: Merge ENA v2.0.0 driver
r348416 Update ENA version to v2.0.0
r348414 Fix ENA manual issues
r348413 Improve ENA reset handling
r348412 Fix NULL pointer dereference in ena_up()
r348411 Unify new line characters in the ENA driver
r348410 Fix Tx offloads for fragmented pkt headers in ENA
r348409 Split ENA reset routine into restore and destroy stages
r348408 Use bitfield for storing global ENA device states
r348407 Fix error handling when ENA reset fails
r348406 Fill bdf field of the host_info structure in ENA
r348405 Add additional doorbells on ENA Tx path
r348404 Limit maximum size of Rx refill threshold in ENA
r348403 Add support for the LLQv2 and WC in ENA
r348402 Lock optimization in ENA
r348401 Add tuneable drbr ring size and hw queues depth for ENA
r348400 Fix error in validate_tx_req_id() in ENA
r348399 Change attach order to prevent crash upon failure in ENA
r348398 Change order of ifp release on ENA detach
r348397 Check for number of MSI-x upon partial allocation in ENA
r348396 Set error value when allocation of IO irq fails in ENA
r348395 Set vaddr and paddr as NULL when DMA alloc fails in ENA
r348394 Fix DMA synchronization in the ENA driver Tx and Rx paths
r348393 Check for missing MSI-x and Tx completions in ENA
r348392 Fill number of CPUs field on ENA host_info structure
r348391 Print ENA Tx error conditionally
r348390 Trigger reset in ENA if there are too many Rx descriptors
r348389 Remove RSS support in ENA
r348388 Add notification AENQ handler for ENA
r348387 Print information when ENA admin error occurs
r348386 Do not specify active media type in ENA
r348385 Adjust ENA driver to the new ena-com
Obtained from: Semihalf
Sponsored by: Amazon, Inc.
Together, these three revisions improve the drm2 (aka legacy drm or
drm-legacy) drivers to point towards graphics/drm-kmod where relevant, and
to remove references to graphics/drm-legacy-kmd as that is being deprecated.
Since part of the drm2 drivers are still used on arm, arm is currently
excluded from the deprecation message.
Update the deprecation message in the drm1 (aka legacy drm or drm-legacy)
drivers to not point towards the drm-legacy-kmod port, as that is being
deprecated.
This is a direct commit to stable/12 since the drm1 code has been removed
from 13 already.
MFC r365248: caroot: properly remove old distrusted roots
The proper procedure was not followed in r364943; all of these that were
deleted should have instead been moved over to the blacklist so that certctl
can DTRT.
Users must still `certctl rehash` after this, but this should generally be
done by one of mergemaster/etcupdate/freebsd-update/pkgbase already; note
that freebsd-update doesn't come into play for this particular update, as
these have not yet made it into a release.
Future work (after svn -> git) will likely change the script that updatecert
invokes to facilitate the process, rather than trusting that kevans or
whomever updates in the future will remember.
r360035:
Move M_RPC malloc type into XDR. Both RPC and XDR libraries use
this type, but since RPC depends on XDR (not vice versa) we need
it defined in XDR to make the module loadable without RPC.
r360036:
Split XDR into separate kernel module. Make krpc depend on xdr.
r360037:
Make ZFS depend on xdr.ko only. It doesn't need kernel RPC.
Don't allow jail.conf variables to have the same names as jail parameters.
It was already not allowed in many cases, but crashed instead of giving an
error.
MFC r364354: TCP Cubic: recalculate cwnd for every ACK.
Since cubic calculates cwnd based on absolute
time, retaining RFC3465 (ABC) once-per-window updates
can lead to dramatic changes of cwnd in the convex
region. Updating cwnd for each incoming ack minimizes
this delta, preventing unintentional line-rate bursts.
Initializing K to zero in D23655 introduced a miscalculation,
where cwnd would suddenly jump to cwnd_max instead of gradually
increasing, after leaving slow-start.
Properly calculating K instead of resetting it to zero resolves
this issue. Also making sure, that cwnd is recalculated at the
earliest opportunity once slow-start is over.
MFC r364195: Improve SACK support code for RFC6675 and PRR
Adding proper accounting of sacked_bytes and (per-ACK)
delivered data to the SACK scoreboard. This will
allow more aspects of RFC6675 to be implemented as well
as Proportional Rate Reduction (RFC6937).
Prior to this change, the pipe calculation controlled with
net.inet.tcp.rfc6675_pipe was also susceptible to incorrect
results when more than 3 (or 4) holes in the sequence space
were present, which can no longer all fit into a single
ACK's SACK option.
John Baldwin [Wed, 2 Sep 2020 21:36:55 +0000 (21:36 +0000)]
MFC 361638,361712: Only build ipsec modules for kernels with IPSEC_SUPPORT.
361638:
Only build ipsec modules if the kernel includes IPSEC_SUPPORT.
Honoring the kernel-supplied opt_ipsec.h in r361632 causes builds of
ipsec modules to fail if the kernel doesn't include IPSEC_SUPPORT.
However, the module can never be loaded into such a kernel, so only
build the modules if the kernel includes IPSEC_SUPPORT.
361712: (kevans)
modules: don't build ipsec/tcpmd5 if the kernel is configured for IPSEC
IPSEC_SUPPORT can currently only cope with either IPSEC || IPSEC_SUPPORT,
not both. Refrain from building if IPSEC is set, as the resulting module
won't be able to load anyways if it's built into the kernel.
KERN_OPTS is safe here; for tied modules, it will reflect the kernel
configuration. For untied modules, it will defer to whatever is set in
^/sys/conf/config.mk, which doesn't set IPSEC for modules. The latter
situation has some risk to it for uncommon scenarios, but such is the life
of untied kernel modules.
At initialization time, the netmap RX refill function used to
prepare the NIC RX ring with N-1 buffers rather than N (with
N equal to the number of descriptors in the NIC RX ring).
This is not how netmap is supposed to work, as it would keep
kring->nr_hwcur not in sync with the NIC "next index to refill"
(i.e., fl->ifl_pidx). Instead we prepare N buffers, although we
still publish (with isc_rxd_flush()) only the first N-1 buffers,
to avoid the NIC producer pointer to overrun the NIC consumer
pointer (for NICs where this is a real issue, e.g. Intel ones).
iflib: fix isc_rxd_flush call in netmap_fl_refill()
The semantic of the pidx argument of isc_rxd_flush() is the
last valid index of in the free list, rather than the next
index to be published. However, netmap was still using the
old convention. While there, also refactor the netmap_fl_refill()
to simplify a little bit and add an assertion.
iflib: netmap: improve rxsync to support IFLIB_HAS_RXCQ
For drivers with IFLIB_HAS_RXCQ set, there is a separate completion
queue. In this case, the netmap rxsync routine needs to update
rxq->ifr_cq_cidx in the same way it is updated by iflib_rxeof().
This improves the situation for vmx(4) and bnxt(4) drivers, which
use iflib and have the IFLIB_HAS_RXCQ bit set.
iflib: refactor netmap_fl_refill and fix off-by-one issue
First, fix the initialization of the fl->ifl_rxd_idxs array,
which was affected by an off-by-one bug.
Once there, refactor the function to use better names for
local variables, optimize the variable assignments, and
merge the bus_dmamap_sync() inner loop with the outer one.
When using v4-mapped IPv6 sockets with IPV6_PKTINFO we do not
respect the given v4-mapped src address on the IPv4 socket.
Implement the needed functionality. This allows single-socket
UDP applications (such as OpenVPN) to work better on FreeBSD.
Requested by: Gert Doering (gert greenie.net), pfsense
Tested by: Gert Doering (gert greenie.net)
Mark Johnston [Mon, 31 Aug 2020 19:59:05 +0000 (19:59 +0000)]
Revert r364987, r364988.
The removal of the kernel_map symbol breaks at least one out-of-tree module,
the nvidia binary driver. Revert the removal for now to maintain KBI
compatibility.
In 13-CURRENT, the linux rc script uses "nocover" mount option to avoid
mounting required filesystems twice. However, this option hasn't been MFC'd.
Implement its functionality in a different way, by stating the mount point.
Alan Somers [Sun, 30 Aug 2020 16:27:58 +0000 (16:27 +0000)]
MFC r364412:
zfs: fix EIO accessing dataset after resuming interrupted receive
ZFS unmounts a dataset while receiving into it and remounts it afterwards.
But if ZFS is resuming an incomplete receive, it screws up and ends up with
a dataset that is mounted, but returns EIO for every access. This commit
fixes that condition.
While the vulnerable code also exists in OpenZFS, the problem is not
reproducible there. Apparently OpenZFS doesn't unmount the destination
dataset during receive, like FreeBSD does.
r357250 (by ganbold@):
Add USB3 related clock definitions for Rockchip RK3328 SoC.
Reviewed by: manu
r363926:
Add flag for SYSCON-controlled clocks on Rockhip platform
Ethernet clocks on RK3328 are controlled by SYSCON registers, so add
RK_CLK_COMPOSITE_GRF flag to indicate that clock node should access grf
registers instead of CRU's
Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D25918
r363927:
Add clocks for ethernet controllers on RK3328
Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D25918
Philip Paeps [Fri, 28 Aug 2020 08:13:49 +0000 (08:13 +0000)]
MFC r350079:
tzsetup: upgrade to zone1970.tab
zone.tab is deprecated. Install zone1970.tab alongside it, and use it
for tzsetup(8). This is also useful for other applications that need
the modern better maintained file.