aboutsummaryrefslogtreecommitdiff
path: root/share
Commit message (Collapse)AuthorAgeFilesLines
* ixl: Add led(4) identification supportKevin Bowling32 hours1-1/+6
| | | | | | | | | | | Expose each physical port identification LED through /dev/led/ixl*. Use the existing GPIO LED helpers for most devices and the PHY provisioning interface for X710 10GBASE-T adapters. Preserve and restore the original GPIO or PHY indication mode, including before the interface is stopped. MFC after: 2 weeks
* ixgbe: Add led(4) identification supportKevin Bowling32 hours1-1/+6
| | | | | | | | | | | | | | | Expose the physical port identification LED through /dev/led/ix*. Save and restore the NVM-selected LEDCTL value around each request. The X550 operations also clear their PHY manual override before the register is restored. Use the dedicated firmware port-identification command on E610. Its interface selects between firmware blinking and the original mode rather than directly controlling LEDCTL. Restore the normal indication before a device stop or reset. MFC after: 2 weeks
* igc: Add led(4) identification supportKevin Bowling32 hours1-1/+9
| | | | | | | | | | | | | I225 and I226 expose three programmable LED outputs. Use LED1 for adapter identification, following the convention in DPDK. Preserve the OEM configuration across identification requests. Restore the OEM configuration before a device reset so an active led(4) pattern cannot leave the output overridden across stop or detach. The LED mode values follow the Intel I225 Software User Manual. MFC after: 2 weeks
* igb(4): Document identification LED device nodesKevin Bowling33 hours1-3/+3
| | | | | | | The shared em(4) manual page lists only the em device-node name. Document the /dev/led/igb* name as well. MFC after: 2 weeks
* committers-src: Add new src committer (kfv)Faraz Vahedi2 days1-0/+5
| | | | | | Reviewed by: dteske, fuz Approved by: dteske (mentor), fuz (mentor) Differential Revision: https://reviews.freebsd.org/D58700
* net: Revert the ioctl SR-IOV VF status interfaceKevin Bowling3 days2-119/+3
| | | | | | | | | | | | | | | | | | | | | | A native route Netlink interface will replace this stack. Requested by: glebius This reverts commit 1ccf543b21eff6e0828142e5c1d09519247143f4. This reverts commit 2c04cfa148ec4dd5cef7e228aaea6a05957fcb15. This reverts commit 2d6114f6d26bf7dfa5ad94e1db9b09ee7108dc7a. This reverts commit d15f2551b25f79ddcbe289faa95e655100b952da. This reverts commit ceb282bbd62eed5e84df9abaede0dd183f66997a. This reverts commit c30021fe0df9e045a17292dbe50dfc054b69871f. This reverts commit fb1820d23a04856a6d3047b4c088cc8df8f76da1. This reverts commit 8696cc600f44767e7988a92c8e6fb943e97d4cc7.
* unix: allow listening on an unbound socket, and binding after listenJohn Ericson3 days1-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | `uipc_listen()` refused a socket that had not been bound, with `EDESTADDRREQ`. That made sense while a pathname was the only way to name a peer: an unbound listener could never be reached, so allowing it would only have created sockets nothing could connect to. Now that `connectat(2)` can name a peer socket by descriptor, an unbound listener *is* reachable, and the restriction only stands in the way. It also left stream sockets oddly stricter than datagram ones, which could already reach an unbound peer. Dropping the check additionally permits `bind(2)` after `listen(2)`: `uipc_bindat()` already allows this, as it only rejects re-binding a socket that has a name. That ordering closes a window listeners otherwise have to leave open. Today the socket file must exist before the socket may listen, so a client connecting in between is refused; binding afterwards publishes the name only once the socket is ready to accept. `unix_seqpacket_test:listen_unbound` asserted the old behaviour, and is inverted accordingly. Signed-off-by: John Ericson <John.Ericson@Obsidian.Systems> Assisted-by: Claude Code (Claude Opus 4.8 and Fable 5) Reviewed by: glebius, markj MFC after: 2 months Differential Revision: https://reviews.freebsd.org/D58683
* unix: allow connectat(2) to name the peer socket by descriptorJohn Ericson3 days1-1/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Accept an empty `sun_path` when `fd` is not `AT_FDCWD`: the descriptor then names the peer unix socket directly, instead of being the starting directory for a pathname lookup. The held file reference keeps the peer PCB stable, playing the role `unp_vp_mtxpool` plays in the pathname path. The descriptor must carry `CAP_CONNECTAT` and refer to an `AF_UNIX` socket (`EPROTOTYPE` otherwise, `ENOTSOCK` for non-sockets). As with a pathname, a stream/seqpacket peer must be listening. No filesystem permission or MAC vnode check applies on this path: possession of the descriptor is the authorization, as with descriptor passing. Note this makes it possible to connect a datagram socket to an unbound peer, which no pathname could previously name. `connect(2)` and the implicit-connect send path pass `AT_FDCWD` and still reject an empty path with `EINVAL`. The `unp_sun_path()` call is hoisted out of `unp_connectat()` because the early exit conditions for the two system calls (`connect(2)` and `connectat(2)`) are slightly different. Additionally, support `/dev/fd/<N>`. In a world with `connectat(2)`, this is largely overkill, but this also allows me to add support for direct peer connections with plain `connect(2)`. I think that is a wise choice because this will allow me to propose this functionality for Linux too without a new system call (saving that conversation for later). Ultimately, I want to see multiple operating systems support this to foster broader userland adoption, which should benefit everyone including FreeBSD --- it's nicer if more 3rd party in addition to 1st party software uses the new kernel functionality. Therefore, I hope this additional feature is also acceptable. Signed-off-by: John Ericson <John.Ericson@Obsidian.Systems> Assisted-by: Claude Code (Claude Opus 4.8 and Fable 5) Reviewed by: markj MFC after: 2 months Differential Revision: https://reviews.freebsd.org/D58405
* ixgbe: Expose EEE LPI event countersKevin Bowling3 days1-1/+7
| | | | | | | | | | | X550-family devices provide clear-on-read counters for transmit and receive Low Power Idle events. Accumulate each register once in the normal statistics poll and expose the monotonic totals below the eee sysctl node. Document the counters together with the existing EEE control. Obtained from: Intel ix 3.4.39 MFC after: 2 weeks
* ixl: Track and recover MDD-blocked VFsKevin Bowling3 days1-0/+6
| | | | | | | | | | | | | | | | | | | | | | The hardware identifies each VF with TX and RX malicious-driver status latches, but the driver combined all events into one counter and reported only the last VF found. It also did not record that hardware had blocked the VF, leaving the condition invisible to management tools. Consume every PF and VF latch, keep per-direction VF counters, rate-limit per-VF diagnostics, and report the blocked and traffic-enabled state via the VF status interface. Clear the software block only after a successful VF or PF reset reconstructs its resources. Match Linux i40e policy by leaving a detected VF blocked by default. Add an opt-in hw.ixl.mdd_auto_reset_vf tunable that notifies and resets the VF for installations that prefer availability. DPDK provides the register clear and per-VF attribution precedent; Linux provides the recovery policy. MFC after: 2 weeks
* ixl: Enforce VF VLAN policyKevin Bowling3 days1-1/+11
| | | | | | | | | | | | | | | | | | Add access and trunk VLAN policy to the SR-IOV schema. Access VFs use a hardware PVID and cannot alter their VLAN membership. Trunk VFs may register up to 16 VLANs, while VLAN 0 remains implicitly admitted for untagged and priority-tagged traffic. Enable hardware VLAN anti-spoofing and maintain the MAC-by-VLAN filter cross-product used by DPDK. Apply Linux's untrusted-VF limits of 18 MAC addresses and 16 VLANs so one guest cannot consume the shared PF filter table without bound. Report the effective policy through the VF status interface and document the iovctl schema. MFC after: 2 weeks Relnotes: yes
* iflib: Support recoverable initialization failureKevin Bowling3 days3-4/+45
| | | | | | | | | | | | | | | | | | | | | | The ifdi_init method cannot report an error, so iflib always marks an interface running and enables its interrupts after the callback returns. Drivers whose hardware initialization depends on an unavailable peer can only return early and leave a falsely running interface. Add iflib_init_failed() so a callback can leave the interface stopped. Also add a conditional reset request for asynchronous recovery: it is discarded if the interface is administratively down when the admin task runs, preventing a queued retry from resurrecting a stopped interface. Do not restore saved driver flags after an MTU or capability change when initialization failed. Restoring the pre-init flags would overwrite the stopped result with stale RUNNING state. Document that reset requests require the caller to schedule the admin task, that output remains blocked during recovery, and that iflib rather than the driver owns the driver flags. MFC after: 2 weeks
* acl(9): fix typo (ACL_ACL -> ACL)Enji Cooper3 days1-1/+1
| | | | MFC after: 1 week
* atomic(9): add missing .Nm entriesEnji Cooper3 days1-0/+3
| | | | | MFC after: 1 week Reported by: make manlint
* alq(9): add missing .Nm entry for ALQ(9)Enji Cooper3 days1-0/+1
| | | | | MFC after: 1 week Reported by: make manlint
* DB_COMMAND(9): correct mdoc markup for .Nm entriesEnji Cooper3 days1-2/+2
| | | | | | | Add missing commas after .Nm entries. MFC after: 1 week Reported by: make manlint
* cpuset(9): correct markupEnji Cooper3 days1-2/+1
| | | | | | | | | - Remove `\(em` from .Nm section as it's not valid mandoc markup. - Remove the section from the .Nm directive (it's handled under the .Dt directive). MFC after: 1 week Reported by: make manlint
* aq(4): report link transitions and previously silent failuresNick Price4 days1-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A link flap left nothing in the log to work from. Both the link up and link down messages were gated on bootverbose while the message for a speed change that keeps carrier was not, so a default kernel was silent about a flap yet loud about a downshift -- the inverse of what an operator wants. The generic message from if_link_state_change() carries no speed, so gating the driver's own left the negotiated rate unrecorded. Report both transitions unconditionally. Say more than the rate. aq_hw_get_link_state() already negotiates flow control and throws it away, and Atlantic 2 reports duplex and EEE in the same link status word the rate comes from; decode them through a new get_link_info firmware op and name all of it on the up transition. EEE matters for a flap: low power idle transitions are a common source of marginal link trouble on multi-gigabit copper, and whether it was active is otherwise invisible. Give the down transition a cause. The PHY global fault code was only consulted from the thermal state machine, so an ordinary link loss reported nothing at all. Read the fault code, the firmware link state and the PHY temperature once per transition and append whatever is available. The firmware raises a fault one poll after it drops the link, so a thermal trip usually shows only its temperature here and aq_thermal_poll() names it on the following poll; the temperature alone is enough to separate a hot PHY from a cable event. Warn before the PHY trips rather than only after. The Atlantic 2 health monitor word carries a hot warning bit next to the ready and fault bits that nothing decoded. Report both edges of it from the thermal poll, so an adapter that is approaching its shutdown threshold says so while the link is still up. Expose the firmware's own link transition counters. The Atlantic 2 A0 statistics layout opens with link_up and link_down, which were read out of the firmware on every statistics poll and discarded. Publish them as dev.aq.N.fw_link_up and fw_link_down so a single flap can be told from a link that has been flapping all night. The B0 layout has no equivalent, so the op reports ENOTSUP there and the nodes are not created, matching how the temperature node is handled. Stop announcing a link state that was never read. The return value of aq_hw_get_link_state() was discarded, so a failed read would have been announced as link down. No firmware backend can fail that call today -- all three decode a register with no error path -- but the caller no longer depends on that, and it says so once if it ever starts failing. Report the hardware failures that were being discarded. The driver already reports the errors it keeps, so what stayed quiet was the set of calls whose result was never examined at all. None of these are expected to fail, which is precisely why a failure needs to say so: each one leaves the interface running but misconfigured in a way that presents as a network problem rather than a driver problem. aq_if_init() discarded aq_hw_start(), aq_hw_rss_hash_set(), aq_hw_rss_set() and aq_hw_udp_rss_enable(), so a datapath that never started or an indirection table that was never programmed showed up only as an interface that passes no traffic or delivers every flow to one queue. aq_mc_filter_apply() discarded aq_hw_mac_addr_set(), so a multicast address the stack believes is programmed could silently not be; report the address that failed and leave the filter slot for the next one instead of burning it. aq_update_vlan_filters() reported only the last of its three register writes. aq_if_stop() discarded both ring stop calls and the MAC reset, and a MAC that did not reset can still be mastering the bus. aq_if_detach() and aq_if_suspend() discarded aq_hw_deinit(). The interrupt moderation update on a link speed change was dropped as well; it runs only on a transition, so reporting it cannot become noisy. aq_if_attach_pre() discarded aq_hw_capabilities(), which is the only behavioral change here: it now fails the attach rather than continuing with an unset media type and an empty link speed mask, which would attach an interface that can never negotiate a link. It returns an error only for a device the probe table does not cover, so it is not reachable in practice. Document the resulting sysctls, along with the existing temperature and tracing nodes, which had no manual page coverage. Tested on an AQC113C (Atlantic 2 B0, firmware 1.5.38). Link up reports "speed=10000, full-duplex, flowcontrol none, EEE off", and "speed=1000" after a forced renegotiation, so the rate and duplex are read rather than assumed. A cable pull reports "link DOWN, F/W link state 0, temp 59 C" with the PHY fault clause correctly absent, which is what separates a cable event from a thermal trip. The B0 interface reports ENOTSUP for the link counters, so those two nodes are correctly not created. Traffic is unaffected: ten flows spread over all eight RX queues with no errors and no drops. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D58749 Signed-off-by: Nick Price <nprice@FreeBSD.org>
* fwcam: convert to video(4) frameworkAbdelkader Boudih4 days1-12/+16
| | | | | | | | Replaced the monolithic cdevsw implementation with the video(4) framework. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D58369
* uvideo: convert to video(4) frameworkAbdelkader Boudih4 days1-2/+3
| | | | | | | | Replaced the monolithic cdevsw implementation with the video(4) framework. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D58368
* video: add generic video(4) capture frameworkAbdelkader Boudih4 days2-0/+102
| | | | | | | | | | Add a new video(4) framework that provides /dev/videoN, buffer management, mmap lifetime, and V4L2 ioctl dispatch for video capture drivers. Hardware drivers implement struct video_hw_ops callbacks and use video_buf_acquire/write/done to deliver frames. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D58367
* rtnetlink: Report SR-IOV VF statusKevin Bowling4 days1-1/+117
| | | | | | | | | | | | | | | | Honor RTEXT_FILTER_VF on RTM_GETLINK requests and expose the versioned SR-IOV VF status through typed nested FreeBSD attributes. Report IFLA_NUM_VF with a successful requested query and preserve per-provider errors in the status container. Map the common nvlist schema to native integer, boolean, string, and binary attributes. Carry namespaced driver extensions as packed versioned nvlists so adding a driver-specific field does not expand the common netlink ABI. Add SNL parsers, parser verification, a constructed nested-status test, and an RTM_GETLINK test for an interface without SR-IOV support. Document the query contract and every attribute.
* libifconfig: Add an SR-IOV VF status queryKevin Bowling4 days1-2/+2
| | | | | | | | | | | | | | Provide a public helper which retrieves, unpacks, and validates the versioned VF status nvlist. Validate the required VF indices and the shape and version of driver-specific extension namespaces while allowing unknown optional fields. The ioctl argument is not copied back when the command returns EFBIG. Start with a practical buffer and grow it geometrically rather than relying on the required length being observable. Use the helper in ifconfig so other consumers share the same transport and validation behavior.
* ixgbe: Reject Flow Director with SR-IOVKevin Bowling5 days1-1/+2
| | | | | | | | | | | | The iflib Flow Director path does not assign filters using the absolute queue and pool identifiers required by SR-IOV. Reject the combination during preflight validation rather than allowing an unsupported configuration to alter the PF receive path. The loader tunable is fixed before VFs can be created, so validation also prevents the reverse ordering of this combination. MFC after: 2 weeks
* iflib: Add sysctl stat for TX watchdog reset eventsKevin Bowling5 days2-4/+9
| | | | | | | | | | | | | | | | | | | iflib counts resets initiated by its transmit watchdog in 69c3e0de01c1. Export the counter in the per-device iflib sysctl tree so every driver provides the diagnostic without a driver callback or duplicate storage. A watchdog reset does not establish how many packets failed. It can recover a hardware stall involving several queued packets or a missed completion involving no packet loss. Stop adding one output error per watchdog event in em(4), igb(4), and igc(4). Remove the redundant driver counters and move the diagnostic to dev.<driver>.<unit>.iflib.tx_watchdog_events. MFC after: 1 month Relnotes: yes
* route.4: Add RTV_METRIC flag to rt_metricsPouria Mousavizadeh Tehrani5 days1-1/+2
| | | | | Reviewed by: ziaee Differential Revision: https://reviews.freebsd.org/D58565
* ixgbe: quarantine repeatedly faulting legacy VFsKevin Bowling6 days1-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | A guest can reinitialize after a VF function-level reset and repeatedly strand an 82599 or X540 PF with invalid descriptor DMA targets. Count only distinct Received Master Abort events accepted by the qualified transmit-stall detector and quarantine the VF after five events. Preserve quarantine across PF reinitialization, reject reset mailbox requests, and keep transmit, receive, and clear-to-send disabled. Recreating SR-IOV clears quarantine. Expose the affected pools through a read-only bitmap. After a successful quarantine FLR, leave the function in post-FLR configuration, explicitly keep decode and bus mastering disabled, verify the Command register, and refresh its PCI-layer cache so a later restore cannot re-enable the function. This addresses CVE-2021-33061 on 82599. Apply the same bounded-failure policy to X540 as defense in depth; the CVE does not list X540. Intel documents the 82599 issue in: http://iommu.com/datasheets/ethernet/controllers-nics/intel/ixgbe/Intel_82599_Application_Note_655276.pdf MFC after: 2 weeks Security: CVE-2021-33061
* ixgbe: Recover legacy VFs from invalid DMA targetsKevin Bowling6 days1-0/+4
| | | | | | | | | | | | | | | | | | | | | | | 82599 and X540 lack the X550 malicious-driver detector. Detect a VF whose PCI status reports a received master abort while its transmit ring has outstanding descriptors and makes no progress across consecutive samples. Consume the accepted PCI status latch, gate that VF I/O, and recover one pending VF per task pass with round-robin selection. This prevents an unreadable function from starving detection or recovery of other VFs. Save the complete writable VF PCI configuration before FLR, restore it afterward, and verify the hardware-backed Command state. Preserve the first good snapshot and pending state across reset events until restore and verification succeed. Introduce a common I/O-disabled policy bitmask so later quarantine policy can extend traffic gating without duplicating fault-state checks. MFC after: 2 weeks
* ixgbe: recover from X550 malicious-driver eventsKevin Bowling6 days1-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The shared X550 code provides malicious-driver detection, event decoding, and per-pool recovery operations, but the PF never enables or services them. A malformed VF descriptor can therefore go undetected and avoid the per-pool recovery path supplied by the MAC. Configure IOV state while VF DMA remains disabled, then enable MDD and activate the VFs only after PF queue initialization is complete. On an MDD event, withdraw mailbox CTS and gate the VF pool through PFVFTE and PFVFRE. Retain the per-queue WQBR blocks until the VF enters a new reset epoch; PFVFTE can still permit descriptor fetches into the internal queue, so releasing WQBR early would allow a hostile VF to retrigger MDD before it resets. Send the non-CTS reset notification after servicing the VF mailbox. Let a posted VF request win mailbox arbitration, defer notification if the pass produced a response, and retry failed notifications from the periodic admin pass. Poll WQBR so recovery does not depend on another mailbox interrupt edge, while suppressing already-fenced pools. Latch a PF reset request until the next hardware initialization. The X550 datasheet defines every bit of WQBR_RX and WQBR_TX as a queue bit, so an all-ones value is valid. Reject it only when IXGBE_STATUS, which has reserved-zero bits, also reads as all ones and confirms dead MMIO. Temporarily disable MDD around live multiqueue SRRCTL drop-mode updates, which hardware otherwise reports as queue-context changes. Serialize that window with the iflib context lock and resample pending work after MDD is restored. Apply the per-pool recovery model used by igb(4) in a2ed165f0049 to the existing DPDK-derived X550 hooks. The same register interface is documented for X552 and X553, so cover the entire X550 family. Document that VF traffic remains disabled until the reset handshake completes. MFC after: 2 weeks Relnotes: yes
* iflib: Permit SR-IOV configuration on a down interfaceKevin Bowling6 days1-3/+5
| | | | | | | | | | | | Drivers which remap PF queues need a stop/mutate/restart transaction only when the interface has live queues. Permit their IOV initialization callback while the interface is administratively down and leave it down afterward. This restores the standard boot-time iovctl.conf workflow for igb and lets other opt-in drivers configure VFs before netif brings the PF up. MFC after: 1 week
* pci: Optionally disable endpoints with unsafe MPSKevin Bowling6 days1-0/+13
| | | | | | | | | Keep warn-only behavior as the default. Add an opt-in policy that clears endpoint decoding and bus mastering when a newly discovered function cannot match its active path, while never disabling bridge functions and their subtrees. MFC after: 2 weeks
* pci: Add a hierarchy-wide MPS limitKevin Bowling6 days1-0/+15
| | | | | | | | Add a boot-time ceiling for MPS reconciliation. Apply it only while an entire cold-enumerated link can be configured consistently, and leave an established active path unchanged. MFC after: 2 weeks
* pci: Reconcile MPS before attaching PCIe devicesKevin Bowling6 days1-0/+3
| | | | | | | | | | | | | | | | | Reconcile each newly enumerated link as a unit before child drivers attach. Firmware may leave Bus Master Enable set after handoff, so use the bus attachment state rather than that bit to identify the cold phase. Preserve an established hierarchy during rescan and hot-add. Refuse a reduction below a switch because recursive enumeration may already have made a sibling subtree live; lowering only the local port or Root Port would produce an inconsistent path. Report capability and active-use conflicts distinctly. Handle OFW PCI buses that clone the generic enumeration path. MFC after: 2 weeks
* pci: Preserve adjusted PCIe control stateKevin Bowling6 days1-1/+10
| | | | | | | | | | | | | | | | | The PCI bus changes live capability registers after the initial configuration snapshot has been saved. A later driver reprobe restores that snapshot and can silently undo the adjustment. Update the cached Device Control and Root Control bits together with pcie_adjust_config() writes. Route the persistent Maximum Read Request setter and the bus-owned AER control changes through that helper as well, so they share the same restore semantics as MPS reconciliation. Document the persistent-write contract. Merge only explicitly adjusted bits into the saved image so unrelated or transient bits observed during the hardware read-modify-write cannot become persistent. MFC after: 2 weeks
* pci: Ignore SR-IOV VFs when tuning MPSKevin Bowling6 days1-1/+12
| | | | | | | | | | | | | The VF Device Control MPS and MRRS fields are reserved and preserved. VF transactions use the PF MPS, so a hardwired VF value must not be used to retune the shared PCIe hierarchy. Document the previously undocumented tuning knob and clarify why a VF may continue to display its reserved hardwired value. This fixes an instant crash/reboot on my Zen3 system with 82599 VFs. MFC after: 1 week
* ixgbe: implement VF secondary MAC filtersKevin Bowling6 days1-0/+10
| | | | | | | | | | | | | | | | | | | | | | The PF advertises the legacy SET_MACVLAN mailbox request but always rejects it. The request installs secondary unicast addresses. Allocate an owned RAR pool for VF secondary addresses, reserve low entries for PF filters, and place VF-primary addresses at the top of the usable RAR range. Reject address collisions and cap each VF at three secondary filters so one guest cannot exhaust the shared table. Clear secondary filters on VF or PF reset and on SR-IOV teardown. This hardware can anti-spoof only the VF primary source address. Reject secondary filters while MAC anti-spoofing is configured, so installing them requires an explicit administrative policy choice. Report optional filter-table allocation failure without disabling SR-IOV. Adapt the owned-RAR allocation and reset-cleanup model from igb(4) in a2ed165f0049 to DPDK's ixgbe SET_MACVLAN mailbox semantics. MFC after: 1 week Relnotes: yes
* ixgbe: preserve VLAN ownership with SR-IOVKevin Bowling6 days1-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The VF VLAN capability is checked but never granted, and no SR-IOV configuration property exposes the existing default-VLAN support. PF VLAN updates also replace VFTA registers from a PF-only shadow, erasing live VF filters. Expose access VLAN and trunk policy through the IOV schema. Track each VF VLAN as desired state, restore the administrative VLAN after reset, and use the native VLVF helper for incremental PF and VF ownership changes. Keep VLAN filtering enabled while SR-IOV is active. When PF hardware filtering is disabled, admit every VLAN to the PF without bypassing per-pool VF isolation. Reconstruct VLVF and the shared VFTA from PF and VF desired state after reset or a filtering-mode transition, and restore PF-only state on teardown. When the last VF leaves a VLAN still owned by the PF, free its VLVF slot while retaining the shared VFTA bit. This prevents a trunk VF from exhausting the 64-entry VLVF table by cycling VLAN memberships. Adapt the VLAN ownership model introduced for igb(4) in a2ed165f0049 to ixgbe's native VLVF machinery. Match Linux receive semantics by exposing a stripped VLAN tag only when that VID was registered by the VF. A PF-assigned port VLAN is an administrative tag and must be delivered to the VF as untagged traffic; otherwise the stack dispatches it to a nonexistent VLAN interface and access-VLAN receive traffic is blackholed. MFC after: 1 week Relnotes: yes
* ctl.4: Document the assumption that CTL HA runs only on trusted networksMark Johnston8 days1-1/+6
| | | | | | | | | | | | | | | | | | | The CTL High Availablity clustering feature allows a pair of hosts to implement transparent failover. The implementation uses a TCP connection to exchange messages. There is no authentication mechanism and the protocol itself embeds kernel pointers in the messages exchanged between HA hosts. This property (of CTL_MSG_DATAMOVE messages specifically), as well as insufficient validation of inbound messages, mean that anyone able to access a CTL HA port is able to remotely execute code on that host. Provide a warning to this effect in the CTL man page. Reported by: Ryan of Calif.io Reviewed by: ziaee, ken, mav MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D58622
* iflib: restore TX watchdog functionalityAlexander Leidinger9 days1-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since f6afed726b00 the TX-hang check in iflib_timer() has required a queue state other than IFLIB_QUEUE_IDLE, but nothing ever sets IFLIB_QUEUE_WORKING, so IFLIB_QUEUE_HUNG has been unreachable ever since: stalled TX queues are not detected, not reported, and not reset - the TX watchdog of every iflib(4) driver has been dead code. Instead of resurrecting the queue-state machine, detect the hang directly. A transmit queue is frozen while it holds descriptors the hardware has not reported as completed and none were reclaimed over a timer period. Being frozen is not a fault: the hardware may defer marking descriptors as completed indefinitely. The check therefore arms only when a frozen queue also takes on new work, while the link is up, no pause frames were received and no doorbell is pending; and it acts only after the queue has stayed frozen for net.iflib.tx_watchdog_periods consecutive periods. It then asks the hardware through the driver's read-only credits peek (isc_txd_credits_update with clear=false, the same call the mp_ring can_drain callback makes routinely): if completions are ready but were not harvested for this long, the completion interrupt went missing - kick the queue's task instead of resetting; if the hardware reports nothing although the queue kept receiving work, it is hung and the existing watchdog reset machinery takes over. Neither software counters alone nor mere persistence of unharvested work can make this decision. iflib reclaims lazily (up to isc_tx_nsegments completed descriptors stay unharvested indefinitely) and defers report-status requests, so "descriptors in use" and "no cleaning progress" are normal states of an idle healthy queue. And hardware that coalesces completion reports (e.g. 8254x, TXDCTL.WTHRESH) legitimately withholds the last one of a quiet queue indefinitely, so a zero credits peek is a normal idle state, not a hang indicator: arming on persistence alone reset healthy interfaces on every traffic lull (field-tested on 82541PI). Only growth across frozen periods separates a wedged queue from a coalescing one. The threshold is a threshold in time, not in device work: a period is one iflib_timer interval (hz/2 by default), so at the default of four periods the verdict falls after roughly two seconds. It was calibrated from counter traces on that old and slow hardware, where healthy coalescing always cleared within two periods; newer hardware reports completions far sooner and leaves the frozen state earlier, so the default needs no recalibration for more modern devices. Setting the sysctl to zero disables the check. A queue whose link is down is never flagged - preserving what f6afed726b00 fixed. The new per-queue state goes into padding the transmit queue structure already had, rather than next to the counters it is derived from: that region is packed, so an insertion there would grow the structure. What is left of that padding is now spelled out instead of being implicit. The size of the structure is unchanged on amd64, arm64, riscv64, i386 and armv7. The IFLIB_QUEUE_* states no longer participate in the watchdog decision; they will be removed in a followup commit. PR: 220997, 239240 Fixes: f6afed726b00 ("iflib: Prevent watchdog from resetting idle queues") Suggested by: gallatin (mxge-style detection) Reviewed by: adrian, markj MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D58266 Assisted-by: Claude Code (Fable 5, Opus 5)
* manuals: Fix more Fx and nearby mechanical typosAlexander Ziaee9 days1-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | Fix compiler warnings related to the Fx macro, as well as all other mechanical typos that were visible within one screenful of them. These cause rendering glitches on various toolchains with various of the five and a half decades of rich output formats and tooling manpages scale to. The *x macro set specifies operating systems. These macros take the rest of the line as an argument. Sometimes, a space was not used to separate the argument of Fx and the trailing period. Others had other parts of the sentence supplied as an argument to Fx. While here, fix the other mechanical typos visible on those specific screenfulls. Correct section typo AUTHOR to AUTHORS, markup utilities with Sy, and apply line break after the end of a sentence. PR: 297248 MFC after: 3 days Reported by: wosch (are you sure that's all of the broken Fx'es?) Fixes: ff2bc641599a ("Fix Fx and nearby mechanical typos") Fixes: d790b16bbf0c ("add man pages for stdbit functions") Fixes: 6c57e368eb17 ("implement C23 memalignment()") Fixes: b06338167d64 ("ROUTE_MPATH and FIB_ALGO") Fixes: 7e1affa242ca ("revise divert-to and divert-reply")
* manuals: Fix Fx and nearby mechanical typosAlexander Ziaee9 days5-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Fix compiler warnings related to the Fx macro, as well as all other mechanical typos that were visible within one screenful of them. These cause rendering glitches on various toolchains with various of the five and a half decades of rich output formats and tooling manpages scale to. The *x macro set specifies operating systems. These macros take the rest of the line as an argument. Sometimes, a space was not used to separate the argument of Fx and the trailing period. Another, FreeBSD Foundation was misrepresented as an operating system version instead of an author. Two more had other parts of the sentence supplied as an argument to Fx. While I had those open, fix the other mechancial typos visible on those specific screenfulls. Fix a list width glitch, correct section typo AUTHOR to AUTHORS, and switch AUTHORS sections containing prose to prose-mode so that they wrap freely when rendered. PR: 297248 MFC after: 3 days Fixes: d39e310c7d6a ("man/man3: add stdbit.3") Fixes: d790b16bbf0c ("add man pages for stdbit functions") Fixes: b61850c4e6f6 ("net.link.bridge.member_ifaddrs to false") Reported by: wosch (groff is complaining about incorrect Fx usage)
* exterror(9): dynamic kernel categoriesBrooks Davis10 days1-2/+9
| | | | | | | | | | | | | | | | Make it possible to define categories without compiling their paths into libc (important for third-party modules). The EXTERR_CATEGORY_DYNAMIC macro can be defined to a string describing the compilation unit (generally the path relative to src/sys) which takes the place of EXTERR_CATEGORY. These strings are assembled in linker sets with category numbers assigned at system startup or module load time. The strings can be retrieved from the kern.exterr.categories.<category> sysctl. Reviewed by: kib Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D58237
* bsd-family-tree: add NetBSD 11.0Maxim Konovalov10 days1-0/+2
|
* igc: Add VLAN hardware filteringKevin Bowling10 days1-3/+3
| | | | | | | | | | Borrow the e1000 VLAN filter table Ambiguous presence of the feature by Intel was settled by DPDK and emperical testing. MFC after: 2 weeks Relnotes: yes
* netinet6: Document IPv4-mapped extension to IPV6_JOIN_GROUP et al.Bruce M Simpson10 days1-1/+20
| | | | | | | | | | | | | | | The IPv6 socket options IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP socket options are being extended to accept IPv4 multicast group addresses in the RFC 3493 IPv4-mapped address format as a convenience to application developers. Caveat this addition carefully in the newly added HISTORY section, addressing all previous review comments. Approved by: ziaee Reviewed by: ziaee, glebius PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193246 Differential Revision: https://reviews.freebsd.org/D55382
* Add new src committer: Minsoo Choo (mchoo)Minsoo Choo14 days1-0/+2
| | | | | | | | 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
* igb(4)/igbv(4): Document SR-IOV PF and VF functionalityKevin Bowling2026-07-302-4/+171
| | | | | | | | | | 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
* coreboot: Add coreboot firmware table driverAbdelkader Boudih2026-07-292-0/+356
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nexus-attached driver that discovers and parses coreboot's LBIO tables from physical memory. Exposes firmware metadata (version, build info, mainboard, serial config, TSC frequency, CBMEM entries) via sysctl hw.coreboot.*, the firmware console ring buffer via /dev/coreboot_console, and structured CBMEM entry access via /dev/cbmem ioctl interface. Tested on: - Qotom Q535G6 (Kabylake) - Intel NUC D54250WYK (Haswell) - Intel NUC D33217GKE (Ivy Bridge) - Dell 3100 2-in-1 (Gabbiter) - Dell 3100 (Fleex) - Lenovo IdeaPad 320s - Lenovo ThinkPad T480 - HP Chromebook 11 G4 - HP Chromebook 11 G5 - HP Chromebook 11 G6 EE - HP Chromebook 14 G4 - HP Chromebook 14 G5 - HP Chromebook x360 11 G1 EE - HP Chromebook x360 11 G2 EE - HP Chromebook x360 14 G1 - Acer C720 - Acer Chromebook 11 - Lenovo N22 Reviewed by: ngie, kib, adrian Differential Revision: https://reviews.freebsd.org/D55649
* mt76: mt7921: update man pageBjoern A. Zeeb2026-07-291-39/+25
| | | | | | | | | | | | Adjust the man page to what other LinuxKPI wlan man pages say and look like as it has been a while since I wrote it. The man page is not yet hooked up to the build on purpose as the driver is not yet enabled in the tree. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: ziaee (earlier version) Differential Revision: https://reviews.freebsd.org/D58479
* netlink: Add RTA_PREFSRC supportPouria Mousavizadeh Tehrani2026-07-281-1/+4
| | | | | | | | | | | | Add the ability to select source ip address of outgoing packets even when the source ip address is configured on another interface. Also add this new rtnetlink attribute to manual. PR: 285422 Reviewed by: glebius, ziaee (manpages) Tested by: ivy, Marek Zarychta <zarychtam@plan-b.pwste.edu.pl> Relnotes: yes Differential Revision: https://reviews.freebsd.org/D58294