e68d76c0 wulf April 24, 2021, 7:01 p.m.
Reported by:	Greg V
MFC after:	1 week
cgit
77651151 trasz April 24, 2021, 10:37 a.m.
Previously we've returned the error from native ptrace(2), ENOMEM.
This confused Linux strace(2).

Reviewed By:	emaste
Sponsored By:	EPSRC
Differential Revision:	https://reviews.freebsd.org/D29925
cgit
a9b66dbd hselasky April 24, 2021, 10:23 a.m.
structure is zeroed, by setting the VNET after checking the mbuf count
for zero. It appears there are some cases with early interrupts on some
network devices which still trigger page-faults on accessing a NULL "ifp"
pointer before the TCP LRO control structure has been initialized.
This basically preserves the old behaviour, prior to
9ca874cf740ee68c5742df8b5f9e20910085c011 .

No functional change.

Reported by:	rscheff@
Differential Revision:	https://reviews.freebsd.org/D29564
MFC after:	2 weeks
Sponsored by:	Mellanox Technologies // NVIDIA Networking
cgit
b99419ae mav April 24, 2021, 3:36 a.m.
Allow new enclosure to replace previously existing one if there is
no completely unused table entry, same as it is done for devices.

If we can not process DPM due to corruption -- wipe it and restart
from scratch.  Otherwise I don't see a way to recover persistence if
something go wrong and there is no BIOS to recover it for us.

Together this solves a problem that appeared when 9300-8i firmware
update to 16.00.10.00 somehow switched its mapping mode from Device
Persistence to Enclosure/Slot without wiping the DPM table.  It made
HBA completely unusable, since overflowed and conflicting mapping
table was unable to map any of enclosures and so devices.

Also while there make some enclosure mapping errors more informative.

MFC after:	1 month
Sponsored by:	iXsystems, Inc.
cgit
2acbe677 avatar April 24, 2021, 3:27 a.m.
3e7bae08210e0 turns the BUS_READ_IVAR() failure from a warning into a
KASSERT.  For certain PCI audio devices such like snd_csa(4) and
snd_emu10kx(4), the ac97_create() keeps the device handler generated
by device_add_child(pci_dev, "pcm"), which is not really a PCI device
handler.  This in turn causes the subsequent pci_get_subdevice()
inside ac97_initmixer() triggering a panic.

This patch tries to put a bandaid for the aforementioned pcm device
children such that they can use the correct PCI handler(from parent)
to avoid a KASSERT panic in the INVARIANTS kernel.

Tested with:	snd_csa(4), snd_ich(4), snd_emu10kx(4)
Reviewed by:	imp
MFC after:	1 month
cgit
4281bfec rmacklem April 23, 2021, 10:24 p.m.
When the NFSv4.1/4.2 server does a callback to a client
on the back channel, it will use a session slot in the
back channel session. If the back channel has failed,
the callback will fail and, without this patch, the
session slot will not be released.
As more callbacks are attempted, all session slots
can become busy and then the nfsd thread gets stuck
waiting for a back channel session slot.

This patch frees the session slot upon callback
failure to avoid this problem.

Without this patch, the problem can be avoided by leaving
delegations disabled in the NFS server.

MFC after:	2 weeks
cgit
576b477b emaste April 23, 2021, 7:36 p.m.
Sponsored by:	The FreeBSD Foundation
cgit
50f5d13e np April 23, 2021, 7:17 p.m.
MFC after:	2 weeks
Sponsored by:	Chelsio Communications
cgit
b0df3658 jhb April 23, 2021, 4:44 p.m.
This fixes a bug in an earlier change to move tree rotation to
the end of the update where the step to make room for the new
preworld tree was deleting the old "current" tree instead of
the old "preworld" tree.

Reported by:	olivier, dhw
Fixes:		0611aec3cf3a373e6a06f103699dbc91c3d6d472
MFC after:	2 weeks
cgit
d500a85e markj April 23, 2021, 2:28 p.m.
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
cgit
8e8f1cc9 markj April 23, 2021, 1:22 p.m.
This reverts a portion of 274579831b61 ("capsicum: Limit socket
operations in capability mode") as at least rtsol and dhcpcd rely on
being able to configure network interfaces while in capability mode.

Reported by:	bapt, Greg V
Sponsored by:	The FreeBSD Foundation
cgit
69440752 arichardson April 23, 2021, 10:28 a.m.
This logic was accidentally changed in 67f2f67fc8ce8484066e95dabac5af892888fca1

Reported By:	olivier
X-MFC-With:	67f2f67fc8ce8484066e95dabac5af892888fca1
Tested By:	kp
Reviewed By:	kp, melifaro
Fixes:		67f2f67fc8ce ("Update rtsock_l3 test after 2fe5a79425c7")
Differential Revision: https://reviews.freebsd.org/D29944
cgit
3183d0b6 gallatin April 23, 2021, 9:55 a.m.
Changes to the LRO code have exposed a bug in iflib where devices
which are not capable of doing LRO are still calling
tcp_lro_flush_all(), even when they have not initialized the LRO
context. This used to be mostly harmless, but the LRO code now sets
the VNET based on the ifp in the lro context and will try to access it
through a NULL ifp resulting in a panic at boot.

To fix this, we unconditionally initializes LRO so that we have a
valid LRO context when calling tcp_lro_flush_all(). One alternative is
to check the device capabilities before calling tcp_lro_flush_all() or
adding a new state flag in the ctx. However, it seems unwise to add an
extra, mostly useless test for higher performance devices when we can
just initialize LRO for all devices.

Reviewed by: erj, hselasky, markj, olivier
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D29928
cgit
5f00292f np April 23, 2021, 7:26 a.m.
It can be called to (re)apply the settings in the driver softc to the
hardware.

MFC after:	2 weeks
Sponsored by:	Chelsio Communications
cgit
b47b28e5 np April 23, 2021, 12:45 a.m.
There are two kinds of routines in the driver that read statistics from
the hardware: the cxgbe_* variants read the per-port MPS/MAC registers
and the vi_* variants read the per-VI registers.  They can be called
from the 1Hz callout or if_get_counter.  All stats collection now takes
place under the callout lock and there is a new flag to indicate that
these routines should not access any hardware register.

MFC after:	2 weeks
Sponsored by:	Chelsio Communications
cgit