FreeBSD/src 4b67335sys/dev/ixgbe ixgbe_type.h ixgbe_common.c

ixgbe: isolate VF reset state

IXGBE_VF_INDEX() selects a 32-VF register bank.  PFMBMEM() selects
one mailbox per VF, while ixgbe_toggle_txdctl() calculates queue
offsets from a VF number.  Passing the bank index aliases VF1-31 to
VF0 and VF32-63 to VF1.  Resetting one VF can therefore clear the peer
mailbox and leave its transmit queues disabled.

The VF raises its reset event before posting its mailbox request.  The
PF checks reset events before mailbox messages.  If both are pending,
clearing PFMBMEM during generic reset handling can erase the request
before ixgbe_read_mbx() consumes it.  Clear the mailbox only from the
reset-message handler after the request has been read.

Use the VF number for queue toggling and document that API contract.

MFC after:      1 week
DeltaFile
+6-14sys/dev/ixgbe/if_sriov.c
+3-3sys/dev/ixgbe/ixgbe_api.c
+1-1sys/dev/ixgbe/ixgbe_type.h
+1-1sys/dev/ixgbe/ixgbe_common.c
+1-1sys/dev/ixgbe/ixgbe_api.h
+12-205 files

FreeBSD/src 9d30fd3sys/dev/igc igc_base.h igc_base.c

igc: Disable ASPM L1.2 on I226 to prevent RX stalls

I226 parts advertise support for the PCIe L1.2 link substate, but a
hardware erratum makes the exit latency from that low-power state
longer than the packet buffer can absorb under load. This stalls the
inbound packet stream. Disabling ASPM system-wide (BIOS or OS ASPM
policy) does not fix it. The L1.2 enable bit must be cleared directly
in the device's own PCIe L1 PM extended capability.

Add igc_is_device_id_i226() to identify affected parts and
igc_disable_broken_aspm_l1_2() to clear the ASPM L1.2 enable bit
on attach and after resume, since PCIe config space can be
reset across a suspend/resume cycle.

Adapted from the Linux igc driver:

  0325143b59c6 igc: disable L1.2 PCI-E link substate to avoid
               performance issue
  1468c1f97cf3 igc: fix disabling L1.2 PCI-E link substate on I226

    [8 lines not shown]
DeltaFile
+44-0sys/dev/igc/if_igc.c
+21-0sys/dev/igc/igc_base.c
+1-0sys/dev/igc/igc_base.h
+66-03 files

FreeBSD/src 04f8a6asys/dev/pci pcireg.h

pci: Add L1 PM definitions

Add register/bit definitions for the L1 PM substates capability
(PCIZ_L1PM) to pcireg.h.

Signed-off-by: Michael Adler <madler at tapil.com>

MFC after:      1 week
Pull-Request:   https://github.com/freebsd/freebsd-src/pull/2318
DeltaFile
+14-0sys/dev/pci/pcireg.h
+14-01 files

FreeBSD/src 4175949sys/dev/e1000 if_em.h if_em.c

e1000: restrict conventional PCI DMA to 32 bits

Some conventional PCI e1000 configurations hang when given DMA
addresses above 4 GB, particularly on systems using AMD
HyperTransport-to-PCI bridges.  Linux has restricted e1000 to DMA32 in
PCI mode since 2011 for the same failure class in commit
e508be174ad36b0cf9b324cd04978c2b13c21502.

Set iflib's DMA width after determining the negotiated bus type.  This
covers descriptor and packet-buffer mappings while preserving 64-bit
DMA for PCI-X and PCIe devices and providing a conditional tunable.

PR:             297064
Reported by:    Alexander Leidinger <netchild at FreeBSD.org>
Tested by:      Alexander Leidinger <netchild at FreeBSD.org>
MFC after:      1 week
DeltaFile
+21-0sys/dev/e1000/if_em.c
+1-0sys/dev/e1000/if_em.h
+22-02 files

FreeBSD/src f4860c3stand/libsa bootp.c

stand: Bump DHCP xid between transactions

Transaction ID should persist only between OFFER and the following
REQUEST.  In all other cases it should change.
DeltaFile
+7-1stand/libsa/bootp.c
+7-11 files

FreeBSD/src a1edeb4sys/dev/e1000 if_em.c

e1000: fix 82574 MSI-X interrupt throttling

em_newitr() and the per-queue interrupt_rate sysctl both tested
que->msix to decide whether an 82574 is running in MSI-X mode.  0 is a
valid MSI-X vector so queue 0 was misclassified as legacy/MSI.

Test sc->intr_type == IFLIB_INTR_MSIX instead.  While here, index the tx
EITR read by tque->msix rather than tque->me so it matches the register
em_newitr() actually writes; the two differ once tx_num_queues exceeds
rx_num_queues.

Also seed que->itr_setting in em_initialize_receive_unit() with the rate
the hardware was just programmed with.  Otherwise an itr_setting left
over from AIM across an interface re-init makes the change detection in
em_newitr() suppress the write that would restore it, leaving the
hardware at the default rate while software believes otherwise.

Fixes:          3e501ef89667 ("e1000: Re-add AIM")

(cherry picked from commit 941113a0097ea047bd493f7f78b384718249779d)
DeltaFile
+20-4sys/dev/e1000/if_em.c
+20-41 files

FreeBSD/src 2389c5dsys/dev/e1000 if_em.c

e1000: fix 82574 MSI-X interrupt throttling

em_newitr() and the per-queue interrupt_rate sysctl both tested
que->msix to decide whether an 82574 is running in MSI-X mode.  0 is a
valid MSI-X vector so queue 0 was misclassified as legacy/MSI.

Test sc->intr_type == IFLIB_INTR_MSIX instead.  While here, index the tx
EITR read by tque->msix rather than tque->me so it matches the register
em_newitr() actually writes; the two differ once tx_num_queues exceeds
rx_num_queues.

Also seed que->itr_setting in em_initialize_receive_unit() with the rate
the hardware was just programmed with.  Otherwise an itr_setting left
over from AIM across an interface re-init makes the change detection in
em_newitr() suppress the write that would restore it, leaving the
hardware at the default rate while software believes otherwise.

Fixes:          3e501ef89667 ("e1000: Re-add AIM")

(cherry picked from commit 941113a0097ea047bd493f7f78b384718249779d)
DeltaFile
+20-4sys/dev/e1000/if_em.c
+20-41 files

FreeBSD/src 491f8d0sys/net if_gre.c

if_gre(4): Fix link state announcement in SIOCDIFPHYADDR

Since we unlock gre before if_detach() and use slock in gre_clone_modify_nl()
there is no need to split if_link_state_change() out of gre_delete_tunnel().

Reported by: markj
Fixes: a0d2e5ebaa2e ("if_gre(4): Fix races by changing initialization order and locks")
DeltaFile
+1-2sys/net/if_gre.c
+1-21 files

FreeBSD/src a28c289. .mailmap, share/misc committers-src.dot

Add new src committer: Minsoo Choo (mchoo)

Completed steps 5-6 and 10 in the committer's guide.

Reviewed by:    jhb
Approved by:    jhb (mentor)
Differential Revision:  https://reviews.freebsd.org/D58507
DeltaFile
+2-0share/misc/committers-src.dot
+2-0.mailmap
+1-0usr.bin/calendar/calendars/calendar.freebsd
+5-03 files

FreeBSD/src fdf86dftests/sys/net Makefile if_gre.sh

if_gre: Add a regression test

Add a regression test for gre(4)
to make sure all of the gre capabilities and options are
working as intended.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D55363
DeltaFile
+396-0tests/sys/net/if_gre.sh
+1-0tests/sys/net/Makefile
+397-02 files

FreeBSD/src 1cd332asbin/ifconfig ifgre.c

ifconfig: Add gre netlink support

Implement netlink support for gre in ifconfig

Differential Revision: https://reviews.freebsd.org/D55366
DeltaFile
+274-0sbin/ifconfig/ifgre.c
+274-01 files

FreeBSD/src a0d2e5esys/net if_gre.h if_gre.c

if_gre(4): Fix races by changing initialization order and locks

Treat if_gre like any other network drivers during module
initialization by using SI_SUB_PROTO_IF.
Also, destroy cloned interfaces via a prison removal callback for
gre over udp.

PR:             275474
Reviewed by:    markj
Discussed with: glebius
Differential Revision: https://reviews.freebsd.org/D57669
DeltaFile
+62-34sys/net/if_gre.c
+0-3sys/net/if_gre.h
+62-372 files

FreeBSD/src 2c98dc4tools/tools/git git-mfc

git-mfc: Give a useful error message if a remote can't be found
DeltaFile
+2-0tools/tools/git/git-mfc
+2-01 files

FreeBSD/src a7677a6tools/tools/git git-mfc.1 git-mfc

git-mfc: Add --abort and --continue flags

Instead of making the user run the underlying git-cherry-pick command
after a conflict.

Requested by:   des
Reviewed by:    des
Differential Revision:  https://reviews.freebsd.org/D58514
DeltaFile
+48-22tools/tools/git/git-mfc
+19-5tools/tools/git/git-mfc.1
+67-272 files

FreeBSD/src ac2ebdapackages/tests Makefile

packages/tests: Fix gtest dependency

The MFC of 1d0ae66d3c21 (packages subdir build) added a dependency
from FreeBSD-tests on FreeBSD-googletest.  However, the googletest
package doesn't exist in 15 because the relevant commit wasn't MFC'd.
This caused a broken and unresolvable dependency.

Replace the incorrect googletest dependency with a dependency on
utilities.

This is a direct commit to stable/15.

Fixes: 1d0ae66d3c21 ("packages: Convert world to a subdir build")
Reviewed by:    cperciva
Reported by:    Mark Millard <marklmi at yahoo.com>
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58553
DeltaFile
+1-1packages/tests/Makefile
+1-11 files

FreeBSD/src 72952bfsys/amd64/amd64 exception.S

amd64: try to fix the build with old clang that does not know about FRED

Reported by:    jhb
Reviewed by:    jhb, jrtc27
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D58550
DeltaFile
+17-0sys/amd64/amd64/exception.S
+17-01 files

FreeBSD/src cef05c5sys/amd64/amd64 exec_machdep.c

amd64: do not allow to set reserved bits in MXCSR for ptrace(PT_SETFPREGS)

Also do not mask bits in the mxcsr_mask.  It is ignored by FRSTOR/XRSTOR.

Reported by:    markj
Reviewed by:    jhb, markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D58548
DeltaFile
+12-5sys/amd64/amd64/exec_machdep.c
+12-51 files

FreeBSD/src 351ed13lib/libfetch common.c

libfetch: Further improve connection polling

* Reorganize the connection loop to make it a little more readable

* Start the timeout clock earlier

* Correctly calculate the poll timeout before calling poll()

* Don't leak the socket on failure

Fixes:          848f360c8f9a ("libfetch: Apply timeout to connection attempts")
Fixes:          b02e02958dad ("libfetch: Fix handling of connection failures")
MFC after:      3 days
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D58512
DeltaFile
+51-36lib/libfetch/common.c
+51-361 files

FreeBSD/src a2e5bacusr.sbin/bhyve bhyve_config.5

bhyve: tidy up bhyve_config.5

There are few warnings reported by mandoc -Tlint:

bhyve_config.5:255:31: WARNING: new sentence, new line
bhyve_config.5:257:43: WARNING: new sentence, new line
bhyve_config.5:422:2: WARNING: missing section argument: Xr nm_open
bhyve_config.5:469:24: WARNING: skipping no-space macro
bhyve_config.5:483:2: WARNING: wrong number of cells: 2 columns, 4 cells
bhyve_config.5:484:2: WARNING: wrong number of cells: 2 columns, 4 cells
bhyve_config.5:541:24: WARNING: skipping no-space macro

 - "new sentence, new line" is a trivial formatting fix.
 - "missing section": there is actually no nm_open() manual page,
    so use .Nm instead of .Xr for it.
 - "no-space macro": format without .Oc and .Ns, similarly to
    how it is already done in bhyve.8 for VNC addresses.
 - "wrong number of cells": also a trivial fix.


    [4 lines not shown]
DeltaFile
+19-9usr.sbin/bhyve/bhyve_config.5
+19-91 files

FreeBSD/src 727a83etests/sys/kern procdesc.c

tests/procdesc: Fix race in pdopenpid_pdwait_only_one

The child exited immediately after pdfork(), so the parent's pdopenpid() could
catch it mid-exit (P_WEXIT) and fail with EBUSY.
Block the child on a pipe until the parent has opened the second descriptor,
then release it

Approved by:    markj
Sponsored by:   Netflix
Differential Revision:  https://reviews.freebsd.org/D58546
DeltaFile
+16-3tests/sys/kern/procdesc.c
+16-31 files

FreeBSD/src c4d7745sys/net if_vxlan.c

if_vxlan(4): Fix panic by validating unused drvspec values

Add validation for unused parameter values in the gap between
VXLAN_PARAM_WITH_LOCAL_ADDR4 and VXLAN_PARAM_WITH_LOCAL_ADDR6 to prevent
panics.

PR:             297151
Reported by:    Robert Morris <rtm at lcs.mit.edu>
Reviewed by:    markj
MFC after:      3 days
Differential Revision: https://reviews.freebsd.org/D58552
DeltaFile
+2-1sys/net/if_vxlan.c
+2-11 files

FreeBSD/src a77257dsys/dev/e1000 e1000_regs.h if_em.h

igbv: Sanitize retained VF queue state

82576 and I350 VFLR leave queue configuration unchanged.  A previous
VF owner can therefore leave a transmit head-writeback DMA destination
and other queue policy for the next guest.

After each reset attempt, disable all exposed VF queues and wait for
their enable bits to clear before clearing SRRCTL, VFPSRTYPE, RXCTRL,
TXCTRL, and TDWBAL/H.  Spin briefly and then sleep until the bounded
queue-disable deadline.

iflib cannot report initialization failure and marks an interface
running after its init callback returns.  On sanitation failure, keep
interrupts disabled and use the deferred admin task to clear RUNNING.
Retry after 100 and 500 ms; after three total failures, leave the
interface down until another administrative initialization starts a
new bounded attempt set.

igbv uses queue zero on both families, but 82576 exposes a second VF

    [8 lines not shown]
DeltaFile
+214-2sys/dev/e1000/if_igbv.c
+20-1sys/dev/e1000/if_em.c
+18-2sys/dev/e1000/e1000_osdep.h
+12-0sys/dev/e1000/if_em.h
+1-0sys/dev/e1000/e1000_regs.h
+265-55 files

FreeBSD/src 8c87247sys/dev/e1000 if_igb_iov.c

igb: Sanitize retained VF queue state

82576 and I350 VFLR leave the VF queue configuration unchanged.  A VF
can program transmit head write-back and leave its DMA destination for
a later VF owner; mainstream VF drivers do not overwrite TDWBAL/H.

Disable every receive and transmit queue assigned to the VF, wait for
the enable bits to clear, then clear SRRCTL, PSRTYPE, RXCTRL, TXCTRL,
and TDWBAL/H.  Spin briefly for the normal transition, then sleep at
100 microsecond intervals with an approximately 1 ms bound.  This
prevents a VF that keeps asserting QUEUE_ENABLE from busy-waiting the
PF context lock for 10 ms.

If a queue does not quiesce, leave the VF disabled and NACK its reset
rather than programming an active queue.  Rate-limit this diagnostic
independently from mailbox and malicious-driver notifications.

I350 maps pool n to queue n.  82576 assigns physical queues n and n+8
to VF n, so sanitize both queues while clearing per-pool PSRTYPE once.

    [11 lines not shown]
DeltaFile
+124-8sys/dev/e1000/if_igb_iov.c
+124-81 files

FreeBSD/src 7cd6d23sys/dev/e1000 if_em.c e1000_osdep.h

e1000: Correct VF register validation

Pass the VF generation through the CSR accessors so the validator can
distinguish the sparse 82576 and I350 register maps.

Admit the queue-zero RXCTRL, TXCTRL, TDWBAL, TDWBAH, and
VFPSRTYPE registers exposed by both families.

82576 exposes VFMPRC at 0xf3c.  I350 erratum 31 makes its
corrected 0xf38 address inaccessible to a VF, so reject both I350
spellings while retaining read access on 82576.

Sponsored by:   BBOX.io
DeltaFile
+18-4sys/dev/e1000/e1000_osdep.h
+1-0sys/dev/e1000/if_em.c
+19-42 files

FreeBSD/src 9b6287ckrb5/include Makefile, krb5/util/profile Makefile.profile Makefile

krb5: Install profile.h again

Commit 1876de606eb8 exposed missing symbols that the port security/krb5
installed that the base system did not install. Part of the solution
was to make libprofile.so private (not libprofile.a) just as the port
does, Red Hat Enterprise Linux does, and as installing MIT KRB5 by hand
does. The actual fix for this was to put symbols and their corresponding
functions into the correct librarires, i.e. libkrb5.so and othes, just
as the port, Red Hat, and manually installed via tarball do.

Unfortunately INTERNALLIB disables the include of bsd.incs.mk and the
install of header files. This is still needed to install profile.h into
/usr/include (just as the port installs it into ${LOCALBASE}/include
and RHEL installs it in /usr/include). This commit fixes this by
installing profile.h into /usr/include from the krb5/include Makfile.

Reported by:    fluffy
Tested by:      fluffy
Reviewed by:    fluffy

    [4 lines not shown]
DeltaFile
+1-26krb5/util/profile/Makefile
+26-0krb5/util/profile/Makefile.profile
+11-3krb5/include/Makefile
+38-293 files

FreeBSD/src 81efd61sys/net/route route_var.h

routing: Remove unused rib_head members

Remove unused rnh_multipath and rib_algo_fixed members.
While here, convert rib_dying and rib_algo_init from uint32_t to bool.

Reviewed by: glebius
Differential Revision: https://reviews.freebsd.org/D58537
DeltaFile
+2-4sys/net/route/route_var.h
+2-41 files

FreeBSD/src 25165e4sys/kern uipc_mbuf.c

mbuf: Make m_unshare() fail on KTLS mbufs

Commit f2202ab5abda did not account for  KTLS mbufs.

m_unshare() tries to linearize the original mbuf chain and creates a
writable copy of it, converting unmapped mbufs.  Both of them are
unsafe for KTLS mbufs.

It is better to return NULL if the mbuf chain contains a KTLS mbuf.

Reported by:    jhb
Reviewed by:    jhb
Differential Revision:  https://reviews.freebsd.org/D58466
DeltaFile
+9-0sys/kern/uipc_mbuf.c
+9-01 files

FreeBSD/src 185becbcontrib/libarchive/libarchive/test test_read_format_zip_winzip_aes256_large_bzip2.zip.uu test_read_format_zip_winzip_aes256_large_lzma.zip.uu

libarchive: merge from vendor branch

libarchive 3.8.9

ChangeLog:
https://github.com/libarchive/libarchive/compare/v3.8.7...v3.8.9

Obtained from:  libarchive
Vendor commit:  27cbc7827172698143e440801fc0ba39ccb4f1f5
MFC after:      2 weeks
DeltaFile
+23,307-0contrib/libarchive/libarchive/test/test_read_format_rar_newsub_rr_over_1m.rar.uu
+2,919-0contrib/libarchive/libarchive/test/test_read_format_cpio_symlink_trailer.cpio.uu
+2,053-0contrib/libarchive/libarchive/test/test_read_format_zip_winzip_aes256_large_zstd.zip.uu
+1,898-0contrib/libarchive/libarchive/test/test_read_format_zip_winzip_aes256_large_xz.zip.uu
+1,893-0contrib/libarchive/libarchive/test/test_read_format_zip_winzip_aes256_large_lzma.zip.uu
+1,616-0contrib/libarchive/libarchive/test/test_read_format_zip_winzip_aes256_large_bzip2.zip.uu
+33,686-0438 files not shown
+58,681-9,875444 files

FreeBSD/src 6d46c75libarchive archive_read_support_format_cab.c archive_read_support_format_7zip.c, libarchive/test test_read_format_iso_rockridge_zf_overflow.iso.uu test_read_format_cpio_symlink_trailer.cpio.uu

Update vendor/libarchive to 3.8.9

ChangeLog:
https://github.com/libarchive/libarchive/compare/v3.8.8...v3.8.9

Obtained from:          libarchive
Libarcive commit:       27cbc7827172698143e440801fc0ba39ccb4f1f5
DeltaFile
+2,919-0libarchive/test/test_read_format_cpio_symlink_trailer.cpio.uu
+556-542libarchive/archive_read_support_format_rar5.c
+1,096-0libarchive/test/test_read_format_iso_rockridge_zf_overflow.iso.uu
+462-411libarchive/archive_read_support_format_7zip.c
+497-347libarchive/archive_read_support_format_cab.c
+728-0unzip/bsdunzip_windows.c
+6,258-1,300233 files not shown
+17,454-7,685239 files

FreeBSD/src 5f02c84share/man/man4 Makefile em.4

igb(4)/igbv(4): Document SR-IOV PF and VF functionality

Document supported controllers, PF and VF naming, PCI_IOV and IOMMU
requirements, queue and lifecycle constraints, iovctl schema, filtering
and anti-spoof policy, mailbox and MDD recovery, shared hardware
limits, rate control, and statistics cadence.

Relnotes:       yes
Sponsored by:   BBOX.io
DeltaFile
+169-4share/man/man4/em.4
+2-0share/man/man4/Makefile
+171-42 files