Report more information on errors, including the the opcode.
PR: 246279
Reviewed by: imp
Tested by: Marek Zarychta
Differential Revision: https://reviews.freebsd.org/D25155
Add tuneable to turn on/off verbosity for debugging purposes. This is
approximately the same as bootverbose, but will print even more
information when > 1.
PR: 246279
Reviewed by: imp
Tested by: Marek Zarychta
Differential Revision: https://reviews.freebsd.org/D25155
Add a sysctl/tuneable to report a different base transfer speed than the
default of 132*1024.
PR: 246279
Reviewed by: imp
Tested by: Marek Zarychta
Differential Revision: https://reviews.freebsd.org/D25155
This appears to be harmless, so ignore data over/under run on
diagnostics.
PR: 246279
Reviewed by: imp
Tested by: Marek Zarychta
Differential Revision: https://reviews.freebsd.org/D25155
Back in July, jhb started a cleanup of our hints. We've removed several
that have been a problem for a long time (including some that had
workarounds for VM images). We've also moved uarts to ACPI only, so they
act more like wiring than enumeration hints. Add a note about this and
ways you can find if your system is affected. Old APU1 routers with
coreboot are affected, but newer APU2 devices are not. Others likely are
as well. The affected systems will be primarily very ancient systems
that pre-date ACPI (i586 arch pentium and older typically), as well as
some older coreboot and similar non-conventional boot firmware setups
(primarily in the embedded space). FreeBSD 15 will require ACPI or
PNPBIOS enumeration for everything by default, so any non-enumerated
devices via these means will require hints. Add notes on how to grep
for affected systems before upgrading.
Sponsored by: Netflix
This also allows to move some bits of ddb print routines into
iommu_utils.c common for x86 iommu drivers.
Sponsored by: Advanced Micro Devices (AMD)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
For now, return zero rid and the device itself. Add a comment noting
that eventually ACPI HID can be used to calculate rid for some more
devices.
Sponsored by: Advanced Micro Devices (AMD)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
The header embeds struct task into defined structures. Also it needs
the PCI_BUSMAX constant.
Sponsored by: Advanced Micro Devices (AMD)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Sometimes, especially with older firmware, mps(4) would have trouble
initializing the card in one of these two steps. Add in a retry after a
short delay. Sean Bruno and Stephen McConnell thought this was OK in the
bug discussions, but never committed it. Steve indicated the delay
might not be necessary, but the OP clearly needed to make it longer to
make things work. I've kept the delay, and added the suggested comment.
Ported the iocfacts part to mpr as well, since we see similar errors
about once every month or two over a few thousand controllers at
work. We've not seen it with IOC_INIT as far back as I can query the
error log database, so I didn't port that forward. We'll see if this
helps, but won't know for sure until next year (so I'm committing it now
since it won't hurt and might help). We usually see this failure in
connection with complicated recovery operations with a drive that's
failing, though, at least in the last year's worth of failures. It's
not clear this is the same as OP or not.
PR: 212841
Sponsored by: Netflix
Co-authored-by: imp
As of 2015 (commit b8c19fd719) the fdisk man page claimed the command
is obsolete, but had no explicit mention of removal. Add another note
that follows our current deprecation notice format.
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47067
In the functions pci_nvme_handle_admin_cmd and pci_nvme_handle_io_cmd
infinite loops are possible in the bhyve process if the sq->tail value
is greater than sq->size.
An attacker could overload the host CPU.
Fix is to validate that doorbell values:
- Are for a valid (i.e., created) queue
- Are not the same as the previous value
- Fit within the available capacity
The emulation will generate an Asynchronous Event Notification (Invalid
Doorbell or Invalid Doorbell Value) if enabled and ignore the doorbell
update.
While in the neighborhood, remove a redundant bounds check.
Reported by: Synacktiv
MFC after: 1 week
Security: HYP-14
Sponsored by: Alpha-Omega Project
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46064
When we reassemble a packet we potentially invalidate the pd->src and pd->dst
pointers as they point into the packet. Reset those after reassembly.
Reported by: markj, KASAN
Sponsored by: Rubicon Communications, LLC ("Netgate")
This should have been commited with bc9402a, need to account for
link_speed of 2500 as well on igc.
MFC after: 6 days
Sponsored by: Rubicon Communications, LLC ("Netgate")
Sponsored by: BBOX.io
0480dccd3f tried to fix the MTU for software VLANs given dpni
announces IFCAP_VLAN_MTU. Unfortunately the initial MRU during
setup is reduced from the maximum supported by the HW to our
maximum ethernet RX frame length so only after further mtu toggles
the solution there would work.
Set the maximum RX frame size (without CRC) to jumbo length +
vlan encap len by default given we also announce IFCAP_JUMBO_MTU.
While here improve the manual (ioctl) MTU setting by checking if
IFCAP_VLAN_MTU is currently enabled and only then add the extra
bytes.
Fixes: 0480dccd3f
MFC after: 3 days
Reviewed by: dsl
Differential Revision: https://reviews.freebsd.org/D47066
Right now flags is set to 0 before this "=" -> "|=" change, but it will
matter when the NOT_YET section above becomes effective.
MFC after: 2 weeks
Sponsored by: Amazon
Ethernet drivers should respect IFF_PROMISC rather than IFF_PPROMISC.
The latter is for user-requested promisc mode, it implies the former
but not vice versa. Some in-kernel components such as if_bridge(4) and
bpf(4) will set promisc mode for interfaces on-demand.
While here, update the debugging message to be not confusing.
This was spotted while reviewing markj@ 's work D46524.
Test from Franco shows that the interface seems to be unconditionally
initialized to promisc mode regardless of this fix. That needs further
investigation.
Reviewed by: markj, Franco Fichtner <franco@opnsense.org>
Tested by: Franco Fichtner <franco@opnsense.org>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D46794
This driver allows only exactly one instance to be created. Clone
creating additional interfaces, e.g. `ifconfig enc1 create`, will get
error EEXIST which is somewhat confusing.
Convert to new KPI for less confusing error ENOSPC.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D45758
igc is derived from igb and has never had an AIM implementation. The
same algorithm from e1000 is appropriate here.
Upon more detailed study of the Linux driver which has a newer AIM
implementation, it finally became clear to me this is actually a
holdoff timer and not an interrupt limit as it is conventionally
(statically) programmed and displayed as an interrupt rate. The data
sheets also make this somewhat clear.
Thus, AIM accomplishes two beneficial things for a wide variety of
workloads[1]:
1. At low throughput/packet rates, it will significantly lower latency
(by counter-intuitively "increasing" the interrupt rate.. better
thought of as decreasing the holdoff timer because you will modulate
down before coming anywhere near these interrupt rates).
2. At bulk data rates, it is tuned to achieve a lower interrupt rate
(by increasing the holdoff timer) than the current static 8000/s. This
decreases processing overhead and yields more headroom for other work
such as packet filters or userland.
For a single NIC this might be worth a few sys% on common CPUs, but may
be meaningful when multiplied such as if_lagg, if_bridge and forwarding
setups.
The AIM algorithm was re-introduced from the older igb or out of tree
driver, and then modernized with permission to use Intel code from other
drivers.
[1]: http://iommu.com/datasheets/ethernet/controllers-nics/intel/e1000/gbe-controllers-interrupt-moderation-appl-note.pdf
MFC after: 1 week
Relnotes: yes
Sponsored by: Rubicon Communications, LLC ("Netgate")
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D47053
All the other man pages, except iicbus(4), use .Sh SYSCTL VARIABLES for
documentig sysctls. iicbus(4) has a legitmate reason for varying,
though.
Sponsored by: Netflix
BLUE often translates to DARK BLUE. On BLACK this is hard to
read. Instead, use CYAN which looks good on both black and white
backgrounds.
Discussed with: kevans
Sponsored by: Netflix
* Add PVR bits for POWER10 and POWER11
* Initialize the `err` outvar, in case it's not touched on success by
the hypervisor, to prevent spurious errors.