tests/netinet6: Add test for route information option
Test handling of receiving multiple route information options in RA.
Reviewed by: glebius
Differential Revision: https://reviews.freebsd.org/D56216
tests/netinet6: Add SLAAC and RA validation tests to ndp
* RA hop limit validation
* RA source address validation
* Multi router RA validation
* Two hour rule RA validation
* SLAAC onlink prefix switching test
Reviewed by: glebius
Differential Revision: https://reviews.freebsd.org/D56128
nd6: Remove goto and unused condition in prelist_update
While here, style it.
Reviewed by: markj, zlei
Differential Revision: https://reviews.freebsd.org/D56136
nd6: Break nd6_prefix_lifetime_update out of prelist_update
Logic of updating prefix lifetime is big enough that deserves
its own function.
While here, fix style.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D56135
nd6: Remove anycast check in prelist_update
RFC 2462 is obsoleted by RFC 4862 and it made statements more
clear than before.
Considering SLAAC can't create anycast addresses by itself, remove
its check.
While here, update comments based on RFC 4862.
Reviewed by: markj, zlei
Differential Revision: https://reviews.freebsd.org/D56134
nd6: Ignore entire PI if violates RFC 4862 section 5.5.3
Ignore prefix information update earlier in `prelist_update()`.
If PI is invalid or autonomous bit is unset, we better to let our
SLAAC address expire and if we don't have any previous matching
prefix, better not to create new one.
Because either our router don't want us to have one anymore, or
the very RA is malicious.
Reviewed by: ae
Differential Revision: https://reviews.freebsd.org/D56133
nd6: Change prelist_update return type to void
The return value of `prelist_update()` is unused.
Reviewed by: markj, zlei
Differential Revision: https://reviews.freebsd.org/D56132
nd6: Break pfxrtr_add out of nd6_prelist_add
Updating defrouter only required by `prelist_update()`.
since `nd6_prelist_add()` is a public function, exclude unsed
dr logic from it.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D56131
nd6: Break nd6_prefix_update out of prelist_update
if PI exists, call prefix_update, instead of doing it inside
the prelist_update.
no functional change intended.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D56130
acpi_spmc(4): Remove redundant setting of 'sc->dev' on attach
Should have been part of the previous commit (but PEBCAK).
Reviewed by: obiwac
Fixes: bd05b47fbd8b ("acpi_spmc(4): Small probe improvements/fixes")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56483
acpi_spmc(4): Small probe improvements/fixes
Remove the test on presence of an ACPI handle, this is implied by
ACPI_ID_PROBE() succeeding.
Set 'sc->dev' early, so that acpi_spmc_check_dsm_set() using
device_printf() will print the driver name.
Add a missing newline after printing that more DSM functions are
implemented then expected.
Reviewed by: obiwac
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56483
uart/pci: recover ADL AMT device after FIFO size probing
When the Alder Lake Serial-over-LAN device is put into loopback mode and
repeated writes are performed to the data register it results in the device
ending up in a non-functional state afterwards.
Recovering the device to a working state requires re-writing the LCR
register with it's current value (no effective change). This should be
harmless on all other devices.
Sponsored by: Citrix Systems R&D
Differential revision: https://reviews.freebsd.org/D56107
Reviewed by: imp
uart/pci: use different probe return values
For PCI devices listed in pci_ns8250_ids return BUS_PROBE_SPECIFIC, while
for generic UART devices not explicitly listed in pci_ns8250_ids return
BUS_PROBE_GENERIC. This allows more specific drivers to take over those
devices, and the generic UART PCI driver will only be used as a fallback.
This fixes an issue where the UART PCI driver would attach to multiport PCI
UART devices, that instead need to use the puc(4) driver to multiplex the
device.
Reported by: markj
Sponsored by: Citrix Systems R&D
Differential revision: https://reviews.freebsd.org/D56467
Reviewed by: markj imp
ping6: treat setsockopt failures as fatal
ping6 needs IPV6_RECVPKTINFO and IPV6_RECVHOPLIMIT to process
incoming replies. When these options fail, replies are silently
dropped and ping6 appears to hang. Use err(3) instead of warn(3)
so the user gets a clear error and immediate exit.
Signed-off-by: Christos Longros <chris.longros at gmail.com>
Reviewed by: pouria, jlduran, glebius
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D56237
iflib: ignore reclaim coalescing when low on tx descriptors
If we are low on TX descriptors, bypass iflib_txq_can_reclaim()
and force a reclaim. This is intended to reduce the number of
output drops under heavy load when using simple transmit.
Differential Revision: https://reviews.freebsd.org/D56339
Sponsored by: Netflix
iflib: accurately count bytes/segments for TSO
When using software based ifnet counters, iflib has not factored
TSO into account when reporting the segments and bytes sent.
So it will underreport NIC bandwidth by a small percent,
and will undercount sent segments by a large factor.
Fix this by calculating the number of added segments the NIC
will send, and add header size multiplied by that number
to arrive at a correct accounting of segments and bytes sent.
This makes these software counters directly comparable to
hardware counters.
Doing this requires moving the calculation into iflib_encap() where
we have already parsed the packet and know the header size, MSS, etc.
Differential Revision: https://reviews.freebsd.org/D56338
Sponsored by: Netflix
ixgbe: improve MDIO performance by reducing semaphore/IPC delays
Each MDIO transfer takes 8ms, and all of that is spent in a set
of DELAY() calls, which is consuming a LOT of CPU.
* Change the timeout in ixgbe_hic_unlocked() - doing IPC to the
on-chip firmware - to a 1uS delay and bump timeout appropriately.
This seems to finish in a couple of microseconds on my local
test devices.
* Change the 2ms sleep in ixgbe_release_swfw_sync_X540() to 2ms
for EEPROM/flash, and 10uS otherwise. 10uS seems to work fine
on my local testing, but the config EEPROM doesn't read right
without this extra delay.
The first change shouldn't change the driver behaviour, but the
latter change is more intrusive and needs some wider testing.
(My guess here is that there SHOULD have been some completion
check somewhere in the EEPROM/flash IO path, and these sleeps
[8 lines not shown]
ixgbe: add MDIO bus support
This works enough to let me see the marvell switch on the MDIO bus.
It uses clause 22, which ixgbe's existing MDIO code doesn't currently
support, so it's implemented in a new source file.
Since mdio(4) is now required, add it where appropriate to GENERIC kernels.
Reviewed by: kbowling
Differential Revision: https://reviews.freebsd.org/D50128
boot1.chrp: Improve comment for the SLOF hack
Since this original comment was written, the actual issue in SLOF
was diagnosed and documented in commit 424089a0fc, which fixed it
for loader(8). Update the comment in boot1 to be more informative
to future readers.
MFC after: 3 days
Reviewed by: jhibbits, adrian
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D56470
loader.efi: Defer efi_translate(e_entry) until after bi_load
bi_load itself loads various things into the staging area which can
cause it to grow, which may result in the staging area moving, including
the kernel. Therefore the address we get for the kernel entry point
prior to bi_load may not be correct afterwards when we actually call it,
and so we must defer the translation.
On arm and riscv (but not arm64, which predates both of them in
loader.efi and did not gain a copy of arm's added printf when arm
support was added) we also printf this entry point to the console, which
we can no longer do since bi_load calls ExitBootServices, so remove this
printf that, in practice, seems to not be so useful, given nobody ever
felt the need to add it to arm64. If anyone really feels this is an
important printf to have then bi_load will need to be split so we can
call printf after all the loading and potential reallocation of the
staging area, but before ExitBootServices is called.
We may also want to make this code more uniform and shared between the
[10 lines not shown]
rc.conf: Fix typo in comment
The correct path is /etc/defaults/rc.conf (defaults in plural).
Reviewed by: netchild
Fixes: cc4eb1ea1040 ("Add support for a /etc/defaults/vendor.conf override file")
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D56456
in_mcast: Avoid calling sysctl_wire_old_buffer() in an epoch section
Wiring a virtual address range may require the thread to sleep, and this
is not permitted in an epoch section.
MFC after: 1 week
pf: use correct address family in pfr_pool_get()
pfr_pool_get() in call to pfr_prepare_network()must use af
instead of hardcoded AF_INET
Issues reported and patch submitted by:
Renaud Allard <renaud () allard ! it>
OK sashan@
Obtained from: OpenBSD, sashan <sashan at openbsd.org>, 8e156a5ebe
Sponsored by: Rubicon Communications, LLC ("Netgate")