FreeBSD/src f6bcc09tests/sys/netinet6 ndp.sh ra.py

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
DeltaFile
+67-0tests/sys/netinet6/ndp.sh
+27-5tests/sys/netinet6/ra.py
+94-52 files

FreeBSD/src c173f02tests/sys/netinet6 ndp.sh ra.py

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
DeltaFile
+380-5tests/sys/netinet6/ndp.sh
+17-4tests/sys/netinet6/ra.py
+397-92 files

FreeBSD/src 7204394sys/netinet6 nd6_rtr.c

nd6: Remove goto and unused condition in prelist_update

While here, style it.

Reviewed by: markj, zlei
Differential Revision: https://reviews.freebsd.org/D56136
DeltaFile
+13-28sys/netinet6/nd6_rtr.c
+13-281 files

FreeBSD/src 5f27592sys/netinet6 nd6_rtr.c

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
DeltaFile
+101-108sys/netinet6/nd6_rtr.c
+101-1081 files

FreeBSD/src e808119sys/netinet6 nd6_rtr.c

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
DeltaFile
+6-19sys/netinet6/nd6_rtr.c
+6-191 files

FreeBSD/src 05f2acdsys/netinet6 nd6_rtr.c

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
DeltaFile
+10-12sys/netinet6/nd6_rtr.c
+10-121 files

FreeBSD/src d022dd8sys/netinet6 nd6_rtr.c

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
DeltaFile
+18-29sys/netinet6/nd6_rtr.c
+18-291 files

FreeBSD/src ced1de2sys/netinet6 nd6_rtr.c nd6.h

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
DeltaFile
+6-9sys/netinet6/nd6_rtr.c
+1-2sys/netinet6/nd6.h
+1-1sys/netinet6/in6_ifattach.c
+1-1sys/netinet6/in6.c
+9-134 files

FreeBSD/src d96e8cbsys/netinet6 nd6_rtr.c

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
DeltaFile
+41-37sys/netinet6/nd6_rtr.c
+41-371 files

FreeBSD/src 0a764besys/dev/acpica acpi_spmc.c

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
DeltaFile
+0-2sys/dev/acpica/acpi_spmc.c
+0-21 files

FreeBSD/src 788d71eusr.sbin/virtual_oss/virtual_oss virtual_oss.8

virtual_oss.8: Remove CPU performance example

See also:       https://github.com/freebsd/virtual_oss/issues/2
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+1-12usr.sbin/virtual_oss/virtual_oss/virtual_oss.8
+1-121 files

FreeBSD/src bd05b47sys/dev/acpica acpi_spmc.c

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
DeltaFile
+5-4sys/dev/acpica/acpi_spmc.c
+5-41 files

FreeBSD/src 45c8ddcsys/dev/uart uart_dev_ns8250.c

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
DeltaFile
+9-0sys/dev/uart/uart_dev_ns8250.c
+9-01 files

FreeBSD/src 2ac5b9bsys/dev/uart uart_bus_pci.c

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
DeltaFile
+26-29sys/dev/uart/uart_bus_pci.c
+26-291 files

FreeBSD/src b4be4a7sys/powerpc/conf GENERIC64 GENERIC64LE

powerpc64: fix builds

Oops, I missed 'device ix' in here, and it now requires mdio.
DeltaFile
+2-0sys/powerpc/conf/GENERIC64
+2-0sys/powerpc/conf/GENERIC64LE
+4-02 files

FreeBSD/src d9e7dd4sys/netinet ip_carp.h ip_carp.c

carp: define CARP_AUTHLEN for carp_authlen field

Replace the bare 7 with a named constant.
DeltaFile
+6-0sys/netinet/ip_carp.h
+1-1sys/netinet/ip_carp.c
+7-12 files

FreeBSD/src 9a4a9f6sbin/ping ping6.c

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
DeltaFile
+4-4sbin/ping/ping6.c
+4-41 files

FreeBSD/src 52e7958sys/net iflib.c

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
DeltaFile
+16-1sys/net/iflib.c
+16-11 files

FreeBSD/src 3fade68sys/net iflib.c

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
DeltaFile
+20-8sys/net/iflib.c
+20-81 files

FreeBSD/src f46d75csys/dev/ixgbe ixgbe_x540.c ixgbe_common.c

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]
DeltaFile
+15-1sys/dev/ixgbe/ixgbe_x540.c
+2-2sys/dev/ixgbe/ixgbe_common.c
+17-32 files

FreeBSD/src cfec995sys/conf files, sys/dev/ixgbe if_ix_mdio_hw.c if_ix_mdio.c

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
DeltaFile
+181-0sys/dev/ixgbe/if_ix_mdio_hw.c
+158-0sys/dev/ixgbe/if_ix_mdio.c
+34-0sys/dev/ixgbe/if_ix_mdio.h
+33-0sys/dev/ixgbe/if_ix_mdio_hw.h
+14-1sys/dev/ixgbe/if_ix.c
+4-0sys/conf/files
+424-13 files not shown
+432-29 files

FreeBSD/src eb02795stand/powerpc/boot1.chrp boot1.c

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
DeltaFile
+5-8stand/powerpc/boot1.chrp/boot1.c
+5-81 files

FreeBSD/src 49e9b30sys/cddl/compat/opensolaris/kern opensolaris_cmn_err.c

dtrace: Improve dmesg kernel message prefix

Provide intuitive log search keywords and increased system consistency.

MFC after:              2 weeks
Reported by:            mav
Reviewed by:            0mp, dteske
OpenZFS change:         d45c8d648 (Improve dmesg kernel message prefix)
Differential Revision:  https://reviews.freebsd.org/D55765
DeltaFile
+7-7sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c
+7-71 files

FreeBSD/src b2aea7ashare/man/man4 e6000sw.4

e6000sw.4: Mention MV88E6171

Fixes:  680e6e30c020 (etherswitch: Add minimal support for mv88e6170)
Reviewed by:            jhibbits
Differential Revision:  https://reviews.freebsd.org/D56455
DeltaFile
+3-1share/man/man4/e6000sw.4
+3-11 files

FreeBSD/src a154d72sys/netinet sctp_structs.h

sctp(4): Fix a typo in a source code comment

- s/initited/initiated/

Obtained from:  NetBSD
MFC after:      3 days
DeltaFile
+1-1sys/netinet/sctp_structs.h
+1-11 files

FreeBSD/src ab1d659stand/efi/loader/arch/arm exec.c, stand/efi/loader/arch/arm64 exec.c

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]
DeltaFile
+2-3stand/efi/loader/arch/arm/exec.c
+2-3stand/efi/loader/arch/riscv/exec.c
+2-1stand/efi/loader/arch/arm64/exec.c
+6-73 files

FreeBSD/src 8e08080libexec/rc rc.conf

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
DeltaFile
+1-1libexec/rc/rc.conf
+1-11 files

FreeBSD/src 9f6041ftests/sys/netinet socket_afinet.c

tests/socket_afinet: Remove a conditional skip

The test runs without any unexpected results when mac_portacl is loaded.

PR:             238781
MFC after:      1 week
DeltaFile
+0-3tests/sys/netinet/socket_afinet.c
+0-31 files

FreeBSD/src c1b514csys/netinet in_mcast.c

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
DeltaFile
+5-7sys/netinet/in_mcast.c
+5-71 files

FreeBSD/src 3c9cd6esys/netpfil/pf pf_table.c

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")
DeltaFile
+1-1sys/netpfil/pf/pf_table.c
+1-11 files