]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
5 years agoMFC r347310:
hselasky [Thu, 16 May 2019 18:17:38 +0000 (18:17 +0000)]
MFC r347310:
Expose per-lane counters before correction mechanism in mlx5en(4).

Sponsored by: Mellanox Technologies

5 years agoMFC r347309:
hselasky [Thu, 16 May 2019 18:16:57 +0000 (18:16 +0000)]
MFC r347309:
Add support for extended PCIe counters in mlx5en(4).

Sponsored by: Mellanox Technologies

5 years agoMFC r347308:
hselasky [Thu, 16 May 2019 18:16:08 +0000 (18:16 +0000)]
MFC r347308:
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.

Sponsored by: Mellanox Technologies

5 years agoMFC r347307:
hselasky [Thu, 16 May 2019 18:13:47 +0000 (18:13 +0000)]
MFC r347307:
Update performance counter bits in mlx5core.

Sponsored by: Mellanox Technologies

5 years agoMFC r347306:
hselasky [Thu, 16 May 2019 18:13:02 +0000 (18:13 +0000)]
MFC r347306:
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.

Sponsored by: Mellanox Technologies

5 years agoMFC r347305:
hselasky [Thu, 16 May 2019 18:12:14 +0000 (18:12 +0000)]
MFC r347305:
Move workqueue from mlx5en(4) to mlx5core.

This avoids creating more workqueues in mlx5core to do
simple firmware command polling tasks.

Sponsored by: Mellanox Technologies

5 years agoMFC r347304:
hselasky [Thu, 16 May 2019 18:11:25 +0000 (18:11 +0000)]
MFC r347304:
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@
Sponsored by: Mellanox Technologies

5 years agoMFC r347303:
hselasky [Thu, 16 May 2019 18:10:10 +0000 (18:10 +0000)]
MFC r347303:
Add support for new rates to mlx5ib.

Submitted by: slavash@
Sponsored by:   Mellanox Technologies

5 years agoMFC r347302:
hselasky [Thu, 16 May 2019 18:09:34 +0000 (18:09 +0000)]
MFC r347302:
Add support for 200Gbit speeds to libibverbs.

Submitted by: slavash@
Sponsored by: Mellanox Technologies

5 years agoMFC r347301:
hselasky [Thu, 16 May 2019 18:08:33 +0000 (18:08 +0000)]
MFC r347301:
Add new rates to ibcore.

Add the new rates that were added to the Infiniband specification as part of
HDR and 2x support.

Submitted by: slavash@
Sponsored by: Mellanox Technologies

5 years agoMFC r347300:
hselasky [Thu, 16 May 2019 18:07:52 +0000 (18:07 +0000)]
MFC r347300:
Do not add IFM_10G_LR and IFM_40G_ER4 to supported media types by default in
mlx5en(4).

IFM_10G_LR and IFM_40G_ER4 media should be added only if the device
has the needed capability bit set for it.

Submitted by: slavash@
Sponsored by: Mellanox Technologies

5 years agoMFC r347299:
hselasky [Thu, 16 May 2019 18:06:56 +0000 (18:06 +0000)]
MFC r347299:
Add support for 200Gb ethernet speeds to mlx5core.

Submitted by: slavash@
Sponsored by: Mellanox Technologies

5 years agoMFC r347298:
hselasky [Thu, 16 May 2019 18:06:10 +0000 (18:06 +0000)]
MFC r347298:
Remove unused speed enums in mlx5core.

Submitted by: slavash@
Sponsored by:   Mellanox Technologies

5 years agoMFC r347297:
hselasky [Thu, 16 May 2019 18:05:16 +0000 (18:05 +0000)]
MFC r347297:
Control automatic update of firmware on driver load with a tunable in mlx5core.

Submitted by: kib@
Sponsored by: Mellanox Technologies

5 years agoMFC r347295:
hselasky [Thu, 16 May 2019 18:02:09 +0000 (18:02 +0000)]
MFC r347295:
Let rx_out_of_buffer be a 32-bit counter in mlx5en(4).

This fixes counting issues when the firmware resets the counter during
allocation of the counter set where the counter belongs.

Sponsored by: Mellanox Technologies

5 years agoMFC r347294:
hselasky [Thu, 16 May 2019 18:01:23 +0000 (18:01 +0000)]
MFC r347294:
Add vnic steering drop statistics in mlx5en(4).

Sponsored by: Mellanox Technologies

5 years agoMFC r347293:
hselasky [Thu, 16 May 2019 18:00:37 +0000 (18:00 +0000)]
MFC r347293:
Use software counters for rx_packets and rx_bytes in mlx5en(4).

The physical- and virtual- port counters might not reflect the amount
of data received after address filtering. Use the software counters
instead for rx_packets and rx_bytes to know exactly how much data
was received.

Sponsored by: Mellanox Technologies

5 years agoMFC r347292:
hselasky [Thu, 16 May 2019 17:59:43 +0000 (17:59 +0000)]
MFC r347292:
Add mlx5_firmware_update() in mlx5core.
Add support for upgrading firmware on mlx5 module load.

Submitted by: slavash@
Sponsored by: Mellanox Technologies

5 years agoMFC r347291:
hselasky [Thu, 16 May 2019 17:59:02 +0000 (17:59 +0000)]
MFC r347291:
Handle IB_EVENT_DEVICE_FATAL event in ipoib.
Perform flush if IB_EVENT_DEVICE_FATAL was received.

Submitted by: slavash@
Sponsored by: Mellanox Technologies

5 years agoMFC r347290:
hselasky [Thu, 16 May 2019 17:57:55 +0000 (17:57 +0000)]
MFC r347290:
Fix for double bus master disable in mlx5core.

mlx5_pci_disable_device is calling pci_disable_device which disables
bus master. No need to explicitly call pci_clear_master.

Submitted by: slavash@
Sponsored by: Mellanox Technologies

5 years agoFix minor compile issue after MFC r347288.
hselasky [Thu, 16 May 2019 17:57:09 +0000 (17:57 +0000)]
Fix minor compile issue after MFC r347288.

This is a direct commit.

Sponsored by: Mellanox Technologies

5 years agoMFC r347289:
hselasky [Thu, 16 May 2019 17:51:30 +0000 (17:51 +0000)]
MFC r347289:
Document userspace firmware flash in mlx5tool(8) and mlx5io(4).

Submitted by: kib@
Sponsored by: Mellanox Technologies

5 years agoMFC r347288:
hselasky [Thu, 16 May 2019 17:50:52 +0000 (17:50 +0000)]
MFC r347288:
Implement userspace firmware update for ConnectX-4/5/6.

Submitted by: kib@
Sponsored by: Mellanox Technologies

5 years agoMFC r347287:
hselasky [Thu, 16 May 2019 17:50:15 +0000 (17:50 +0000)]
MFC r347287:
Rename mlx5_fwdump_addr to more neutral mlx5_tool_addr in mlx5core.

Submitted by: kib@
Sponsored by: Mellanox Technologies

5 years agoMFC r347286:
hselasky [Thu, 16 May 2019 17:49:29 +0000 (17:49 +0000)]
MFC r347286:
Add mlxfw callbacks in mlx5core.

Add mlx5 implementation for the ones defined by the mlxfw
shared module to be used while flashing the device firmware.

The callbacks do their job through the MCQI, MCC and MCDA registers.

Linux commit:
62bd22cf326dc4ac5be673c11cef4602dc1f5e47

Submitted by: slavash@
Sponsored by: Mellanox Technologies

5 years agoMFC r347285 and r347327:
hselasky [Thu, 16 May 2019 17:48:36 +0000 (17:48 +0000)]
MFC r347285 and r347327:
Initial version of Mellanox in-kernel firmware upgrade support.

Submitted by: slavash@
Sponsored by: Mellanox Technologies

5 years agoMFC r347284:
hselasky [Thu, 16 May 2019 17:38:59 +0000 (17:38 +0000)]
MFC r347284:
Convert remaining module parameters into SYSCTLs in mlx5core.

Sponsored by: Mellanox Technologies

5 years agoMFC r347283:
hselasky [Thu, 16 May 2019 17:38:11 +0000 (17:38 +0000)]
MFC r347283:
Remove redundant line of code in mlx5core.

Sponsored by: Mellanox Technologies

5 years agoMFC r347282:
hselasky [Thu, 16 May 2019 17:37:34 +0000 (17:37 +0000)]
MFC r347282:
Change implicit and probably erronous EPERM to EIO on command status error
in mlx5core.

Submitted by: kib@
Sponsored by: Mellanox Technologies

5 years agoMFC r347281:
hselasky [Thu, 16 May 2019 17:36:52 +0000 (17:36 +0000)]
MFC r347281:
Fix typo.

Submitted by: kib@
Sponsored by: Mellanox Technologies

5 years agoMFC r347280:
hselasky [Thu, 16 May 2019 17:36:18 +0000 (17:36 +0000)]
MFC r347280:
Fix style.

Submitted by: kib@
Sponsored by: Mellanox Technologies

5 years agoMFC r347279:
hselasky [Thu, 16 May 2019 17:35:39 +0000 (17:35 +0000)]
MFC r347279:
Fix netstat counters mapping in mlx5en(4).

The current mapping of driver counters to netstat counters is wrong.
For example, a single jabber packet, will cause the Ierrs counter to
count three times.

The work for mapping the hardware and software counters to their right
place in netstat counters were already done in Linux, take that as is
to the FreeBSD driver.

Submitted by: slavash@
Sponsored by: Mellanox Technologies

5 years agoMFC r347278:
hselasky [Thu, 16 May 2019 17:34:54 +0000 (17:34 +0000)]
MFC r347278:
Fix endless loop in ipoib_poll().

ib_req_notify_cq may return negative value which will indicate a
failure. In the case of uncorrectable error, we will end up in an
endless loop. Fix that, by going to another loop with poll_more
only if there is anything left to poll.

Submitted by: slavash@
Sponsored by: Mellanox Technologies

5 years agoMFC r347277:
hselasky [Thu, 16 May 2019 17:34:09 +0000 (17:34 +0000)]
MFC r347277:
Avoid leaking send queue mbufs during error recovery in mlx5en(4).

Sponsored by: Mellanox Technologies

5 years agoMFC r347276:
hselasky [Thu, 16 May 2019 17:33:24 +0000 (17:33 +0000)]
MFC r347276:
Add helper functions to set/query MCC/MCDA/MCQI registers in mlx5core.

To be used by the mlx5 callbacks exposed to the mlxfw module.

Linux commit:
d2ad488b0073bd1a2c3f5d2ea50a7eb632103e5d

Submitted by: slavash@
Sponsored by: Mellanox Technologies

5 years agoMFC r347275:
hselasky [Thu, 16 May 2019 17:32:47 +0000 (17:32 +0000)]
MFC r347275:
Enhance MCAM reg to allow query on access reg support in mlx5core.

Enhance MCAM to allow the driver to query which access regs are
supported. For now, expose the regs needed for FW flashing.

Linux commit:
0ab87743cc8c5bcd482daf71961ed5fc45349e01

Submitted by: slavash@
Sponsored by: Mellanox Technologies

5 years agoMFC r347274:
hselasky [Thu, 16 May 2019 17:32:08 +0000 (17:32 +0000)]
MFC r347274:
Add MCC (Management Component Control) register definitions in mlx5core.

MCC (Management Component Control) allows to control a firmware
component update.

MCDA (Management Component Data Access) allows to read and write
a firmware component.

MCQI (Management Component Query Information) allows to query
information about firmware components.

Linux commit:
4717628938423fcba0aa8fa889e9fed4eb6a655f

Submitted by: slavash@
Sponsored by: Mellanox Technologies

5 years agoMFC r347273:
hselasky [Thu, 16 May 2019 17:31:31 +0000 (17:31 +0000)]
MFC r347273:
Add reading the mcam_reg in mlx5core.

Submitted by: slavash@
Sponsored by: Mellanox Technologies

5 years agoMFC r347272:
hselasky [Thu, 16 May 2019 17:30:55 +0000 (17:30 +0000)]
MFC r347272:
Query and cache PCAM, MCAM registers on initialization in mlx5core.

On load_one, we now cache our capabilities registers internally, similar
to QUERY_HCA_CAP. Capabilities can later be queried using macros
introduced in this patch.

Linux commit:
71862561f3a62015a11de16d1c306481e8415c08

Submitted by: slavash@
Sponsored by: Mellanox Technologies

5 years agoMFC r347271:
hselasky [Thu, 16 May 2019 17:30:20 +0000 (17:30 +0000)]
MFC r347271:
Implement PCAM, MCAM access register commands in mlx5core.

Introduced registers will expose capabilities of new registers and
features related to port/management.
Driver will query MCAM and PCAM in order to avoid failing on old
firmwares with lack of support.

Linux commit:
c835ad64683bd3e2d1b31ed2cb1ff4366932edb1

Submitted by: slavash@
Sponsored by: Mellanox Technologies

5 years agoMFC r347270:
hselasky [Thu, 16 May 2019 17:29:43 +0000 (17:29 +0000)]
MFC r347270:
Expose PCAM, MCAM registers infrastructure in mlx5core.

PCAM: Ports capabilities mask register.
MCAM: Management capabilities mask register.

PCAM and MCAM registers will provide information regarding firmware
support for different features, in order to avoid cases where new driver
combined with old firmware results in syndromes (for ex. PCIe counters
before this patchset).

Linux commit:
cfdcbceaeffc669b70d904d80a2df9c86c232566

Submitted by: slavash@
Sponsored by: Mellanox Technologies

5 years agoMFC r347269:
hselasky [Thu, 16 May 2019 17:29:04 +0000 (17:29 +0000)]
MFC r347269:
Add sysctl(8) to control fast unload support in mlx5core.

Sponsored by: Mellanox Technologies

5 years agoMFC r347268:
hselasky [Thu, 16 May 2019 17:28:30 +0000 (17:28 +0000)]
MFC r347268:
Add Fast teardown support to mlx5core.

Today mlx5 devices support two teardown modes:
1- Regular teardown
2- Force teardown

This change introduces the enhanced version of the "Force teardown" that
allows SW to perform teardown in a faster way without the need to reclaim
all the pages.

Fast teardown provides the following advantages:
1- Fix a FW race condition that could cause command timeout
2- Avoid moving to polling mode
3- Close the vport to prevent PCI ACK to be sent without been
   scattered to memory

Linux commit:
fcd29ad17c6ff885dfae58f557e9323941e63ba2

Sponsored by: Mellanox Technologies

5 years agoMFC r347266:
hselasky [Thu, 16 May 2019 17:25:41 +0000 (17:25 +0000)]
MFC r347266:
Implement get and set nic state as global functions in mlx5core.

Sponsored by: Mellanox Technologies

5 years agoMFC r347265:
hselasky [Thu, 16 May 2019 17:25:01 +0000 (17:25 +0000)]
MFC r347265:
Ticks are integer type in FreeBSD.

Sponsored by: Mellanox Technologies

5 years agoMFC r347264:
hselasky [Thu, 16 May 2019 17:24:21 +0000 (17:24 +0000)]
MFC r347264:
Configure firmware to use RX hash format in mini CQE in mlx5en(4).

When using CQE zipping, one can choose between RX hash and Checksum.
This will indicate the parameter on which a zipping session should be
stopped.

While porting the Linux code, Checksum was chosen. However, the value
of Checksum is not being used anywhere.
For the FreeBSD driver, we prefer to use the RX hash format which will
guarantee the RX hash value for all the mini CQEs.
While at it, make sure to initialize the Checksum value in the
decompressed CQE.

Submitted by: slavash@
Sponsored by: Mellanox Technologies

5 years agoMFC r347263:
hselasky [Thu, 16 May 2019 17:23:36 +0000 (17:23 +0000)]
MFC r347263:
Disable CQE zipping by default in mlx5en(4).

After doing performance measurements, it seems like CQE zipping doesn't
have any significant benefit.
Moreover, we know that this feature is disabled by default on other
operating systems (Linux for example).

Submitted by: slavash@
Sponsored by: Mellanox Technologies

5 years agoMFC r347262:
hselasky [Thu, 16 May 2019 17:22:57 +0000 (17:22 +0000)]
MFC r347262:
Split mlx5e_update_stats_work() in mlx5en(4).

Split the function into the mlx5e_update_stats_locked() core and make
mlx5e_update_stats_work() call the _locked helper, similar to many other
places in the kernel. This improves the code structure, making the
locking clean.

Submitted by: kib@
Sponsored by: Mellanox Technologies

5 years agoMFC r347261:
hselasky [Thu, 16 May 2019 17:22:11 +0000 (17:22 +0000)]
MFC r347261:
Implement fast close of RX channel in mlx5en(4).

Instead of waiting for all jobs to be cancelled, simply close the completion
queue to prevent more completion events and let mlx5e_destroy_rq() cleanup
the remaining mbufs.

Sponsored by: Mellanox Technologies

5 years agoMFC r347260 and r347326:
hselasky [Thu, 16 May 2019 17:21:27 +0000 (17:21 +0000)]
MFC r347260 and r347326:
Correct number of elements for priority to traffic class mappings in mlx5en(4).

The number of priorities is always 8, while the number of traffic classes
supported can vary. While at it convert the sysctl node into an array.

Sponsored by: Mellanox Technologies

5 years agoMFC r347259:
hselasky [Thu, 16 May 2019 17:19:48 +0000 (17:19 +0000)]
MFC r347259:
Remove unused module parameter in mlx5ib.

Sponsored by: Mellanox Technologies

5 years agoMFC r347258:
hselasky [Thu, 16 May 2019 17:19:03 +0000 (17:19 +0000)]
MFC r347258:
Make sure to error out when arming the CQ fails in mlx4ib and mlx5ib.

Sponsored by: Mellanox Technologies

5 years agoMFC r347257:
hselasky [Thu, 16 May 2019 17:18:29 +0000 (17:18 +0000)]
MFC r347257:
Make sure to error out when arming the CQ fails in ibcore.

Sponsored by: Mellanox Technologies

5 years agoMFC r347256:
hselasky [Thu, 16 May 2019 17:17:52 +0000 (17:17 +0000)]
MFC r347256:
Destroy port stats debug context in correct order in mlx5en(4).
Destroy children nodes before parent nodes.

Sponsored by: Mellanox Technologies

5 years agoMFC r347255:
hselasky [Thu, 16 May 2019 17:17:12 +0000 (17:17 +0000)]
MFC r347255:
Fix tx_jumbo_packets counter in mlx5en(4).

Instead of reading Ethernet RFC 2819 pXtoYoctets counters from
hardware which counts RX octets, count tx_stat_pXtoYoctets from
Ethernet extended counters which counts TX octets.

TX jumbo counters should be accumulated only after the PPCNT
counters were fetched from hardware with their latest value.

Submitted by: slavash@
Sponsored by: Mellanox Technologies

5 years agoMFC r347254:
hselasky [Thu, 16 May 2019 17:16:31 +0000 (17:16 +0000)]
MFC r347254:
Update Ethernet extended counters in mlx5en(4).

Expose all Ethernet extended counters those counters via debug_stats
sysctl:
dev.mce.X.debug_stats

Submitted by: slavash@
Sponsored by: Mellanox Technologies

5 years agoMFC r347253:
hselasky [Thu, 16 May 2019 17:15:41 +0000 (17:15 +0000)]
MFC r347253:
Protect from infinite sw-reset loop in mlx5core.

Avoid an infinite software firmware reset loop that may be caused by a
hardware bug by limiting the maximum number of resets.
The counter between resets is reset by request for reset, and not by a
successful reset.
The interval between two resets can be configured via sysctl:
hw.mlx5.sw_reset_timeout
which is global to all mlx5 devices in the system.

Submitted by: slavash@
Sponsored by: Mellanox Technologies

5 years agoMFC r347252:
hselasky [Thu, 16 May 2019 17:15:00 +0000 (17:15 +0000)]
MFC r347252:
Disable all MSIX interrupts before shutdown in mlx5.

Make sure the interrupt handlers don't race with the fast unload one
code in the shutdown handler.

Sponsored by: Mellanox Technologies

5 years agoMFC r347251:
hselasky [Thu, 16 May 2019 17:14:08 +0000 (17:14 +0000)]
MFC r347251:
Import Linux code to implement mlx5_ib_disassociate_ucontext() in mlx5ib.

Submitted by: kib@
Sponsored by: Mellanox Technologies

5 years agoMFC r347250:
hselasky [Thu, 16 May 2019 17:13:21 +0000 (17:13 +0000)]
MFC r347250:
Add temperature warning event to log in mlx5core.

Temperature warning event is sent by FW to indicate high temperature
as detected by one of the sensors on the board.
Add handling of this event by writing the numbers of the alert sensors
to the kernel log.

Linux commit:
1865ea9adbfaf341c5cd5d8f7d384f19948b2fe9

Submitted by: slavash@
Sponsored by: Mellanox Technologies

5 years agoMFC r347249:
hselasky [Thu, 16 May 2019 17:12:38 +0000 (17:12 +0000)]
MFC r347249:
Correctly define the interface state bits in mlx5en(4).

While at it remove unused interface state bits. This also fixes and issue
during shutdown:

There is an issue where the firmware fails during mlx5_load_one,
the health_care timer detects the issue and schedules a health_care call.
Then the mlx5_load_one detects the issue, cleans up and quits. Then
the health_care starts and calls mlx5_unload_one to clean up the resources
that no longer exist and causes kernel panic.

The root cause is that the bit MLX5_INTERFACE_STATE_DOWN is not set
after mlx5_load_one fails. The solution is removing the bit
MLX5_INTERFACE_STATE_DOWN and quit mlx5_unload_one if the
bit MLX5_INTERFACE_STATE_UP is not set. The bit MLX5_INTERFACE_STATE_DOWN
is redundant and we can use MLX5_INTERFACE_STATE_UP instead.

Linux commit:
10a8d00707082955b177164d4b4e758ffcbd4017
b3cb5388499c5e219324bfe7da2e46cbad82bfcf

Sponsored by: Mellanox Technologies

5 years agoMFC r347248:
hselasky [Thu, 16 May 2019 17:11:45 +0000 (17:11 +0000)]
MFC r347248:
Enable FPGA and FPGA QP errors for EQ and call the handler in mlx5core.

Submitted by: kib@
Sponsored by: Mellanox Technologies

5 years agoMFC r347247:
hselasky [Thu, 16 May 2019 17:11:02 +0000 (17:11 +0000)]
MFC r347247:
Add MLX5_FPGA_RELOAD IOCTL(2) to mlx5fpga.

Submitted by: kib@
Sponsored by: Mellanox Technologies

5 years agoMFC r347246:
hselasky [Thu, 16 May 2019 17:09:06 +0000 (17:09 +0000)]
MFC r347246:
Add support for Dynamic Interrupt Moderation, DIM, in mlx5en(4).

Add support for DIM based on Linux,
with some minor adaptions specific to FreeBSD.

Linux commit
f97c3dc3c0e8d23a5c4357d182afeef4c67f5c33

Sponsored by: Mellanox Technologies

5 years agoMFC r347190:
hselasky [Thu, 16 May 2019 17:04:15 +0000 (17:04 +0000)]
MFC r347190:
Use PCIV_INVALID in pci_channel_offline() in the LinuxKPI.

Build tested drm-current-kmod prior to commit.

Submitted by: slavash@
Sponsored by: Mellanox Technologies

5 years agoMFC r347188:
hselasky [Thu, 16 May 2019 17:03:16 +0000 (17:03 +0000)]
MFC r347188:
Disabling a PCI device should only disable busmaster in the LinuxKPI.

As Linux comment for this function point:
Signal to the system that the PCI device is not in use by the system
anymore. This only involves disabling PCI bus-mastering, if active.

Build tested drm-current-kmod prior to commit.

Submitted by: slavash@
Sponsored by: Mellanox Technologies

5 years agoMFC r347187:
hselasky [Thu, 16 May 2019 17:02:31 +0000 (17:02 +0000)]
MFC r347187:
Implement print_hex_dump_debug() function macro in the LinuxKPI.

Build tested drm-current-kmod prior to commit.

Submitted by: slavash@
Sponsored by: Mellanox Technologies

5 years agoMFC r347185:
hselasky [Thu, 16 May 2019 17:01:39 +0000 (17:01 +0000)]
MFC r347185:
Allow controlling pr_debug at runtime in the LinuxKPI.

Turning on pr_debug at compile time make it non-optional at runtime.
This often means that the amount of the debugging is unbearable.
Allow developer to turn on pr_debug output only when needed.

Build tested drm-current-kmod prior to commit.

Submitted by: kib@
Sponsored by: Mellanox Technologies

5 years agoMFC r346968, r346973
ian [Thu, 16 May 2019 15:32:03 +0000 (15:32 +0000)]
MFC r346968, r346973

r346968:
Update the manpage text to show the output generated by the first-stage
bootloader these days (x86 instead of i386).

r346973:
Add a paragraph that mentions gptboot having an interactive mode, and
direct the user to the boot(8) manpage, which provides the details on that.

5 years agoMFC r347368:
kib [Thu, 16 May 2019 14:48:08 +0000 (14:48 +0000)]
MFC r347368:
x86: Put other CPUs into tight loop when updating Intel microcode from
loaded OS.

5 years agoMFC r343985, r344133, r345273 (by bde):
kib [Thu, 16 May 2019 14:46:21 +0000 (14:46 +0000)]
MFC r343985, r344133, r345273 (by bde):
Prevent overflow for usertime/systime in caclru1().

PR: 76972

5 years agoMFC r337715, r337751, r337754, r337758, r337813, r338354, r338687,
markj [Thu, 16 May 2019 14:42:16 +0000 (14:42 +0000)]
MFC r337715, r337751, r337754, r337758, r337813, r338354, r338687,
    r339124, r341821:
Add support for boot-time Intel microcode loading.

5 years agoMFC r346402:
tuexen [Thu, 16 May 2019 11:20:02 +0000 (11:20 +0000)]
MFC r346402:

When a checksum has to be computed for a received IPv6 packet because it
is requested by the application using the IPPROTO_IPV6 level socket option
IPV6_CHECKSUM on a raw socket, ensure that the packet contains enough
bytes to contain the checksum at the specified offset.

5 years agoMFC r346401:
tuexen [Thu, 16 May 2019 11:18:50 +0000 (11:18 +0000)]
MFC r346401:

Avoid a buffer overwrite in rip6_output() when computing the checksum
as requested by the user via the IPPROTO_IPV6 level socket option
IPV6_CHECKSUM. The check if there are enough bytes in the packet to
store the checksum at the requested offset was wrong by 1.

5 years agoMFC r346400:
tuexen [Thu, 16 May 2019 11:14:08 +0000 (11:14 +0000)]
MFC r346400:

Improve input validation for the socket option IPV6_CHECKSUM.

When using the IPPROTO_IPV6 level socket option IPV6_CHECKSUM on a raw
IPv6 socket, ensure that the value is either -1 or a non-negative even
number.

5 years agoMFC r346182:
tuexen [Thu, 16 May 2019 11:09:53 +0000 (11:09 +0000)]
MFC r346182:

When sending IPv4 packets on a SOCK_RAW socket using the IP_HDRINCL option,
ensure that the ip_hl field is valid. Furthermore, ensure that the complete
IPv4 header is contained in the first mbuf. Finally, move the length checks
before relying on them when accessing fields of the IPv4 header.

5 years agoMFC r347016:
dchagin [Thu, 16 May 2019 10:43:52 +0000 (10:43 +0000)]
MFC r347016:

Remove unneeded includes.

5 years agoMFC r346134:
tuexen [Thu, 16 May 2019 09:33:38 +0000 (09:33 +0000)]
MFC r346134:

Fix an SCTP related locking issue. Don't report that the TCB_SEND_LOCK
is owned, when it is not.

This issue was found by running syzkaller.

5 years agoMFC r345525:
tuexen [Thu, 16 May 2019 09:32:00 +0000 (09:32 +0000)]
MFC r345525:

Fix a double free of an SCTP association in an error path.
This is joint work with rrs@. The issue was found by running
syzkaller.

5 years agoMFC r345505:
tuexen [Thu, 16 May 2019 09:29:49 +0000 (09:29 +0000)]
MFC r345505:

Initialize scheduler specific data for the FCFS scheduler.
This is joint work with rrs@. The issue was reported by using
syzkaller.

5 years agoMFC r345504:
tuexen [Thu, 16 May 2019 09:28:34 +0000 (09:28 +0000)]
MFC r345504:

Improve locking when tearing down an SCTP association.
This is joint work with rrs@ and the issue was found by
syzkaller.

5 years agoMFC r345494:
tuexen [Thu, 16 May 2019 09:27:13 +0000 (09:27 +0000)]
MFC r345494:

Fix the handling of fragmented unordered messages when using DATA chunks
and FORWARD-TSN.

This bug was reported in https://github.com/sctplab/usrsctp/issues/286
for the userland stack.

This is joint work with rrs@.

5 years agoMFC r345467:
tuexen [Thu, 16 May 2019 09:25:49 +0000 (09:25 +0000)]
MFC r345467:

Fix build issue for the userland stack.
Joint work with rrs@.

5 years agoMFC r345466:
tuexen [Thu, 16 May 2019 09:24:11 +0000 (09:24 +0000)]
MFC r345466:

Fix more signed unsigned issues. This time on the send path.
This is joint work with rrs@ and was found by running syzkaller.

5 years agoMFC r345465:
tuexen [Thu, 16 May 2019 09:22:37 +0000 (09:22 +0000)]
MFC r345465:

Fix a signed/unsigned bug when receiving SCTP messages.
This is joint work with rrs@.

5 years agoMFC r345461:
tuexen [Thu, 16 May 2019 09:20:54 +0000 (09:20 +0000)]
MFC r345461:

Limit the size of messages sent on 1-to-many style SCTP sockets with the
SCTP_SENDALL flag. Allow also only one operation per SCTP endpoint.

This fixes an issue found by running syzkaller and is joint work with rrs@.

5 years agoMFC r345460:
tuexen [Thu, 16 May 2019 09:18:59 +0000 (09:18 +0000)]
MFC r345460:

Limit the number of bytes which can be queued for SCTP sockets.
This is joint work with rrs@.

5 years agoMFC r344925:
tuexen [Thu, 16 May 2019 09:16:47 +0000 (09:16 +0000)]
MFC r344925:

Fix locking bug.

5 years agoMFC r344924:
tuexen [Thu, 16 May 2019 09:15:18 +0000 (09:15 +0000)]
MFC r344924:

Some cleanup and consistency improvements.

5 years agoMFC r344872:
tuexen [Thu, 16 May 2019 09:13:41 +0000 (09:13 +0000)]
MFC r344872:

After removing an entry from the stream scheduler list, set the pointers
to NULL, since we are checking for it in case the element gets inserted
again.

This issue was found by running syzkaller.

5 years agoMFC r344742:
tuexen [Thu, 16 May 2019 09:12:13 +0000 (09:12 +0000)]
MFC r344742:

Allocate an assocition id and register the stcb with holding the lock.
This avoids a race where stcbs can be found, which are not completely
initialized.

This was found by running syzkaller.

5 years agoMFC r344726:
tuexen [Thu, 16 May 2019 09:10:14 +0000 (09:10 +0000)]
MFC r344726:

Remove debug output.

5 years agoMFC r344724:
tuexen [Thu, 16 May 2019 09:07:11 +0000 (09:07 +0000)]
MFC r344724:

Allow SCTP stream reconfiguration operations only in ESTABLISHED
state.

This issue was found by running syzkaller.

5 years agoMFC r344723:
tuexen [Thu, 16 May 2019 09:05:15 +0000 (09:05 +0000)]
MFC r344723:

Handle the case when calling the IPPROTO_SCTP level socket option
SCTP_STATUS on an association with no primary path (early state).

This issue was found by running syzkaller.

5 years agoMFC r344722:
tuexen [Thu, 16 May 2019 09:03:48 +0000 (09:03 +0000)]
MFC r344722:

Use correct buffer sizes in sctp_get[lp]addrs().

5 years agoMFC r344721:
tuexen [Thu, 16 May 2019 09:02:30 +0000 (09:02 +0000)]
MFC r344721:

Report the correct length when using the IPPROTO_SCTP level
socket options SCTP_GET_PEER_ADDRESSES and SCTP_GET_LOCAL_ADDRESSES.

5 years agoMFC r344708:
tuexen [Thu, 16 May 2019 08:57:08 +0000 (08:57 +0000)]
MFC r344708:

Honor the memory limits provided when processing the IPPROTO_SCTP
level socket option SCTP_GET_LOCAL_ADDRESSES in a getsockopt() call.

Thanks to Thomas Barabosch for reporting the issue which was found by
running syzkaller.

5 years agoMFC r344704:
tuexen [Thu, 16 May 2019 08:53:55 +0000 (08:53 +0000)]
MFC r344704:

mprove consistency, not functional change.

5 years agoMFC r344048:
tuexen [Thu, 16 May 2019 08:50:25 +0000 (08:50 +0000)]
MFC r344048:

Improve input validation for raw IPv4 socket using the IP_HDRINCL
option.

This issue was found by running syzkaller on OpenBSD.
Greg Steuck made me aware that the problem might also exist on FreeBSD.

5 years agoMFC r343961:
tuexen [Thu, 16 May 2019 08:47:28 +0000 (08:47 +0000)]
MFC r343961:

Fix a locking issue when reporing outbount messages.