Commit Graph

241379 Commits

Author SHA1 Message Date
Michael Tuexen
5cc11a89db Prevent cwnd to collapse down to 1 MSS after exiting recovery.
This is descrined in RFC 6582, which updates RFC 3782.

Submitted by:		Richard Scheffenegger
Reviewed by:		lstewart@
MFC after:		1 week
Differential Revision:	https://reviews.freebsd.org/D17614
2019-05-09 07:11:08 +00:00
Gleb Smirnoff
6ca363eb7b Existense of PCB route caching doesn't allow us to use new fast route
lookup KPI in ip_output() like it is already used in ip_forward().
However, when there is no PCB provided we can use fast KPI, gaining
performance advantage.

Typical case when ip_output() is called without a PCB pointer is a
sendto(2) on a not connected UDP socket. In practice DNS servers do
this.

Reviewed by:	melifaro
Differential Revision:	https://reviews.freebsd.org/D19804
2019-05-08 23:39:24 +00:00
Emmanuel Vadot
e599c3d449 etc/Makefile: Remove empty newline
This was commited accidently in r347356 and cause distribution with
NO_ROOT set to fail.

Reported by:	ci, kib
MFC after:	2 weeks
X-MFC-With:	r347356
2019-05-08 21:26:11 +00:00
Colin Percival
19a60fdc19 Bump EC2 AMI filesystem size up to 4000 MB.
AMIs have been breaking for the past month due to insufficient disk space.

Due to the small amount of overhead in the disk image, the EC2 AMIs end
up with the same (4GB) minimum disk size.

Reported by:	Michal Krawczyk
2019-05-08 21:03:03 +00:00
Warner Losh
9835d216d8 rename nvme_ctrlr_destroy_qpair to nvme_ctrlr_destroy_qpairs
Maintain symmetry with nvme_ctrlr_create_qpairs, making it easier to
match init/uninit scenarios.

Signed-off-by: John Meneghini <johnm@netapp.com>
Submitted by: Michael Hordijk <hordijk@netapp.com>
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D19781
2019-05-08 20:18:11 +00:00
Konstantin Belousov
83cb39d443 x86: Put other CPUs into tight loop when updating Intel microcode from
loaded OS.

This should prevent at least some theoretical issues whith code
execution on HT sibling of the core where the update is loaded.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D20201
2019-05-08 20:01:09 +00:00
Emmanuel Vadot
09001efbbe dts: Import files from Linux 5.1
MFC after:	2 months
2019-05-08 19:27:30 +00:00
Brooks Davis
f6c5aa9f28 Update dme(4) to reflect that it will not be removed due to FCP-101.
dme(4) is the built-in NIC on a couple non-expandable mips platforms and
thus should remain.  The FCP has been updated to reflect this fact.

Discussed with:	imp
2019-05-08 19:05:58 +00:00
Emmanuel Vadot
0db636cb5e Import Linux 5.1 DTS files 2019-05-08 19:00:46 +00:00
Emmanuel Vadot
9e71188763 dtb: allwinner: Add the pinebook dtb to the build 2019-05-08 18:56:24 +00:00
Edward Tomasz Napierala
ac0879c396 Add usage example to tree(3).
Obtained from:	OpenBSD
MFC after:	2 weeks
Sponsored by:	Klara Inc.
2019-05-08 18:49:59 +00:00
Edward Tomasz Napierala
e4c934a516 Mark inline functions with __unused; prevents compiler warning
when they end up being unused.

Reviewed by:	kib
Obtained from:	OpenBSD
MFC after:	2 weeks
Sponsored by:	Klara Inc.
Differential Revision:	https://reviews.freebsd.org/D20185
2019-05-08 18:47:00 +00:00
Li-Wen Hsu
b056a52947 Fix expected output after r347207
While phil is working on fixing in libxo general test parts, updating these
files to stop the test failure warnings

Approved by:	phil
MFC with:	r347207
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D20188
2019-05-08 18:46:12 +00:00
Matt Macy
7efc81bf28 Enable sys/disk.h consumers to avoid pulling in networking headers.
The networking headers break ZoF.
2019-05-08 18:10:19 +00:00
Emmanuel Vadot
3d4dafef99 pkgbase: Deal with the last etc files
Add tags=package=runtime for password related files.
Add tags=package=sendmail for rc.sendmail
Add tags=package=ipfw for rc.firewall

Reviewed by:	bapt
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D20173
2019-05-08 17:46:59 +00:00
Mateusz Guzik
ac97da9ad8 Reduce umtx-related work on exec and exit
- there is no need to take the process lock to iterate the thread
  list after single-threading is enforced
- typically there are no mutexes to clean up (testable without taking
  the global umtx lock)
- typically there is no need to adjust the priority (testable without
  taking thread lock)

Reviewed by:	kib
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D20160
2019-05-08 16:30:38 +00:00
Justin Hibbits
2b03b6bd45 powerpc/booke: Rewrite pmap_sync_icache() a bit
* Make mmu_booke_sync_icache() use the DMAP on 64-bit prcoesses, no need to
  map the page into the user's address space.  This removes the
  pvh_global_lock from the equation on 64-bit.
* Don't map the page with user-readability on 32-bit.  I don't know what the
  chance of a given user process being able to access the NULL page when
  another process's page is added there, but it doesn't seem like a good
  idea to map it to NULL with user read permissions.
* Only sync as much as we need to.  There are only two significant places
  where pmap_sync_icache is used: proc_rwmem(), and the SIGILL second-chance
  for powerpc.  The SIGILL second chance is likely the most common, and only
  syncs 4 bytes, so avoid the other 127 loop iterations (4096 / 32 byte
  cacheline) in __syncicache().
2019-05-08 16:15:28 +00:00
Ruslan Bukin
fcc3a0f630 Connect Xilinx AXI drivers and Cadence Ethernet MAC to the RISC-V build.
Sponsored by:	DARPA, AFRL
2019-05-08 16:06:54 +00:00
Justin Hibbits
4023311a29 powerpc/booke: Do as much work outside of TLB locks as possible
Reduce the surface area of the TLB locks.  Unfortunately the same trick for
serializing the tlbie instruction on OEA64 cannot be used here to reduce the
scope of the tlbivax mutex to the tlbsync only, as the mutex also serializes
the TLB miss lock as a side effect, so contention on this lock may not be
reducible any further.
2019-05-08 16:05:18 +00:00
Ruslan Bukin
5939d8a1a2 Add driver for the Xilinx AXI Direct Memory Access (AXI DMA) controller
found in the U.S. Government Furnished Equipment (GFE) 64-bit RISC-V cores.

Sponsored by:	DARPA, AFRL
2019-05-08 15:43:17 +00:00
Emmanuel Vadot
052073c382 Add support for USB 3.0 XHCI via ACPI
Ampere eMAG systems have XHCI just described in ACPI, not on PCI.

Submitted by:	Greg V <greg@unrelenting.technology>
Reviewed by:	andrew
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D19986
2019-05-08 15:42:39 +00:00
Ruslan Bukin
85ae89f4bb Add driver for Xilinx AXI Ethernet tri-mode (10/100/1000 Mb/s) MAC found
in the U.S. Government Furnished Equipment (GFE) 64-bit RISC-V cores.

Sponsored by:	DARPA, AFRL
2019-05-08 15:36:57 +00:00
Ruslan Bukin
101869a8f0 o Implement a bounce buffer based on device reserved memory.
Grab device reserved physical memory regions from FDT using standard
  "memory-region" property and use vmem(9) to allocate buffers from it.
  The same vmem could be used by DMA engine drivers to allocate memory for
  DMA descriptors.
  This is required for platforms that provide uncached memory region
  reserved exclusively for DMA operations.
o Change sleepable sx(9) lock type to non-sleepable mutex(9) since
  network drivers usually hold mutex during DMA operations. So we don't
  take sleepable lock after non-sleepable.

Tested on U.S. Government Furnished Equipment (GFE) 64-bit RISC-V cores.

Sponsored by:	DARPA, AFRL
2019-05-08 15:22:27 +00:00
Antoine Brodin
9c8f66cb8b Add wc(1) to native-xtools so that it can be used in qemu-user jails 2019-05-08 15:17:36 +00:00
Conrad Meyer
e01ada5c44 random(4): Don't complain noisily when an entropy source is slow
Mjg@ reports that RDSEED (r347239) causes a lot of logspam from this printf,
and I don't feel that it is especially useful (even ratelimited).  There are
many other quality/quantity checks we're not performing on entropy sources;
lack of high frequency availability does not disqualify a good entropy
source.

There is some discussion in the linked Differential about what logging might
be appropriate and/or polling policy for slower TRNG sources.  Please feel
free to chime in if you have opinions.

Reported by:	mjg
Reviewed by:	markm, delphij
Approved by:	secteam(delphij)
X-MFC-With:	r347239
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D20195
2019-05-08 14:54:32 +00:00
Ed Maste
52bcb118a9 Avoid literal @generated tag in file-generating scripts
We don't want the generator itself tagged as a generated file.

Reviewed by:	cem
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D20182
2019-05-08 13:35:51 +00:00
Hans Petter Selasky
c9c8bf05a1 Fix LINT linking issue.
Add missing mlxfw symbols to LINT builds.

MFC after:	3 days
Sponsored by:	Mellanox Technologies
2019-05-08 12:28:11 +00:00
Hans Petter Selasky
dfea1c3e32 Fix LINT compilation issue.
"mdev" is unused when building LINT targets.

MFC after:	3 days
Sponsored by:	Mellanox Technologies
2019-05-08 12:27:16 +00:00
Hans Petter Selasky
cf59f7e108 Bump the Mellanox driver version numbers and the FreeBSD version number.
MFC after:	3 days
Sponsored by:	Mellanox Technologies
2019-05-08 11:15:07 +00:00
Hans Petter Selasky
8d1eeedb5d Make command workqueue persistant in mlx5core.
There is no reason to re-create the command workqueue during healthcare.
This also fixes an issue where a previous work struct may refer to a
destroyed workqueue.

MFC after:	3 days
Sponsored by:	Mellanox Technologies
2019-05-08 11:09:08 +00:00
Hans Petter Selasky
cf551f955d Fix race between driver unload and dumping firmware in mlx5core.
Present code uses lock-less accesses to the dump data to prevent top
level ioctls from blocking bottom-level call to dump.  Unfortunately, this
depends on the type stability of the dump data structure, which makes it
non-functional during driver teardown.

Switch to the mutex locking scheme where top levels use the mutex in the
bound regions, while copyouts and drain for completion utilize condvars.
The mutex lifetime is guaranteed to be strictly larger than the time
interval where driver can initiate dump, and most of the control fields
of the old struct mlx5_dump_data are directly embedded into struct
mlx5_core_dev.

Submitted by:	kib@
MFC after:	3 days
Sponsored by:	Mellanox Technologies
2019-05-08 11:08:48 +00:00
Hans Petter Selasky
39c6d43ee5 Ensure the flowtable rules are not freed twice in mlx5en(4).
This can happen when re-loading the driver.

MFC after:	3 days
Sponsored by:	Mellanox Technologies
2019-05-08 11:08:21 +00:00
Hans Petter Selasky
f5233a73d8 Undo previous steps upon returning failure in mlx5en(4).
Else flowtable resources may not be properly freed.

MFC after:	3 days
Sponsored by:	Mellanox Technologies
2019-05-08 11:08:01 +00:00
Hans Petter Selasky
47d93c5c43 Make sure the flow destination structure does not use values off the stack
in mlx5en(4).

MFC after:	3 days
Sponsored by:	Mellanox Technologies
2019-05-08 11:07:42 +00:00
Hans Petter Selasky
a0a4fd7734 Flush command workqueue when command completion is triggered in mlx5core.
Avoid race for command completion when triggering a command completions event.
Serialize operation by queueing all commands on the same work queue.
This can happen when healthcare triggers.

MFC after:	3 days
Sponsored by:	Mellanox Technologies
2019-05-08 11:07:20 +00:00
Hans Petter Selasky
4f22751048 Make command timeout way shorter in mlx5core.
The command timeout is terribly long, whole two hours. Make it 60s so if
things do go wrong, the user gets feedback in relatively short time, so
they can take corrective actions and/or investigate using tools and such.

Linux commit:
6b6c07bdcdc97ccac2596063bfc32a5faddfe884

MFC after:	3 days
Sponsored by:	Mellanox Technologies
2019-05-08 11:07:00 +00:00
Hans Petter Selasky
4d0e6d8452 Remove non-functional MLX5E_MAX_RX_SEGS macro in mlx5en(4).
MFC after:	3 days
Sponsored by:	Mellanox Technologies
2019-05-08 11:06:42 +00:00
Hans Petter Selasky
8b825a1857 Fix for compilation warning in mlx5en(4).
Function 'mlx5e_alloc_rx_wqe' can never be inlined because it uses alloca
(override using the always_inline attribute)

MFC after:	3 days
Sponsored by:	Mellanox Technologies
2019-05-08 11:06:22 +00:00
Hans Petter Selasky
bd802cea53 Rename functions from mlx5_fwdump to mlx5_ctl in mlx5core.
Submitted by:	kib@
MFC after:	3 days
Sponsored by:	Mellanox Technologies
2019-05-08 11:05:59 +00:00
Hans Petter Selasky
b4b75592d6 Ensure that only one command is specified at a time in mlx5tool(8).
Submitted by:	kib@
MFC after:	3 days
Sponsored by:	Mellanox Technologies
2019-05-08 11:05:30 +00:00
Hans Petter Selasky
998c9a2bbc Implement firmware reset from userspace in mlx5tool(8).
Submitted by:	kib@
MFC after:	3 days
Sponsored by:	Mellanox Technologies
2019-05-08 11:05:09 +00:00
Hans Petter Selasky
939c79a213 Add Firmware Reset Level, MFRL, register accessors in mlx5core.
Submitted by:	kib@
MFC after:	3 days
Sponsored by:	Mellanox Technologies
2019-05-08 11:04:40 +00:00
Hans Petter Selasky
13a2290c66 Add ConnectX-6 DX HCA ID to libmlx5.
In addition, add "ConnectX family mlx5Gen Virtual Function" device ID.
Every new HCA VF will be identified with this device ID.

Submitted by:	slavash@
MFC after:	3 days
Sponsored by:	Mellanox Technologies
2019-05-08 11:04:09 +00:00
Hans Petter Selasky
c62f4d8de8 Expose per-lane counters before correction mechanism in mlx5en(4).
MFC after:	3 days
Sponsored by:	Mellanox Technologies
2019-05-08 11:03:29 +00:00
Hans Petter Selasky
5f9484f3f1 Add support for extended PCIe counters in mlx5en(4).
MFC after:	3 days
Sponsored by:	Mellanox Technologies
2019-05-08 11:02:36 +00:00
Hans Petter Selasky
67fd194170 Extend the counters framework in mlx5en(4).
Allow more macro arguments and split the variable type and name into
separate arguments. This allows simple and powerful copy and extraction
of values from IFC based structures into SYSCTLs with the use of a single
macro.

MFC after:	3 days
Sponsored by:	Mellanox Technologies
2019-05-08 10:59:16 +00:00
Hans Petter Selasky
c71a71bafc Update performance counter bits in mlx5core.
MFC after:	3 days
Sponsored by:	Mellanox Technologies
2019-05-08 10:58:41 +00:00
Hans Petter Selasky
adb6fd50c8 Implement reading PCI power status in mlx5core.
Implement a watchdog as part of the healtcare subsystem which
reads the PCI power status during startup and upon the PCI
power status change event and store it into the core device
structure. This value is then exported to user-space via a
read-only SYSCTL. A dmesg print has been added to inform
the admin about the PCI power status.

MFC after:	3 days
Sponsored by:	Mellanox Technologies
2019-05-08 10:58:06 +00:00
Hans Petter Selasky
40218d734d Move workqueue from mlx5en(4) to mlx5core.
This avoids creating more workqueues in mlx5core to do
simple firmware command polling tasks.

MFC after:	3 days
Sponsored by:	Mellanox Technologies
2019-05-08 10:57:37 +00:00
Hans Petter Selasky
ebf7e777cd Always return success for RoCE modify port in mlx5ib.
CM layer calls ib_modify_port() regardless of the link layer.

For the Ethernet ports, qkey violation and Port capabilities
are meaningless. Therefore, always return success for ib_modify_port
calls on the Ethernet ports.

Linux Commit:
ec2558796d25e6024071b6bcb8e11392538d57bf

Submitted by:	slavash@
MFC after:	3 days
Sponsored by:	Mellanox Technologies
2019-05-08 10:57:16 +00:00