Skip to content

Measurements

OPNsense's reload in a recovery in place, under a time limit of 300 s, the second XGS 3300, 2026-11-30

On 2026-11-02 the second XGS 3300's recovery in place stopped in OPNsense's reload of its interfaces (rc.reload_all), in Unbound's reconfiguration, and only fastpath.py's cap of 900 s ended it: the appliance was restarted, and nothing in the recovery's lines said where the reload had waited (984). Since this change recover.sh runs that reload under a limit of its own, 300 s. A reload still running then is ended, and the recovery goes on with a warning that says the step the reload waited in (from the system log), the processes it left waiting, and for a lock file they wait on, the processes holding it. A reload that ends in time says none of it.

The driver stays loaded once a tunnel has been given its transform, XGS 136, 2026-11-28

On the lab XGS 136 on 2026-11-28 at 07:54 UTC, a reload of npuep.ko from 0.1.0-alpha.15.2 to 0.2.0-alpha.1.1 stopped the host with a general protection fault in ipsec4_perform_request (issue 1230). An outbound IPsec association still named the unloaded module's copy of the kernel's ESP transform, and the next build's read-only data sat at its address. strongSwan's log on the box shows a MOBIKE address update between the reload before and that one: an address update is what makes the kernel clone an association, transform pointer and all, without offering the clone to a driver. The dump kept has not been read, so which association it was is still not known.

Switch weights on the second XGS 3300: the shares follow the table once port 0's pause is off, 2026-11-19

os-trafficpriority gives a class a minimum - a part of a full port that its switch queue keeps - by the switch's weight table: os-xgs-npu's switch tool (src/opnsense/scripts/xgs/switch_qos.py) writes one sequence of queue numbers for the whole 88E6193X chip, and a port in weighted mode serves its queues in that order. Written for two classes at 30 and 20 turns, the table did not show: earlier the same day the class at 30 took 914.5 to 924.2 Mbit/s at line rate and the class at 20 took 10.3 to 18.4. These runs found why, and the lever: with port 0's pause off - the switch's flow control toward the coprocessor - the shares follow the table, 59:41 for 30:20 and 38:62 for 30:50, for 1 to 3 % of the line rate with two streams.

A connection taken out of hardware gives pf its last counts, measured, 2026-11-18

Once a connection runs in the coprocessor, pf's state of it grows only by what the driver gives it: the coprocessor's counts, read from its statistics messages about once a second, handed to the state by the keep-alive at its visits (dev.octep.0.dp.hw_to_pf; on the XGS 136 dev.npuep.0.flow.hw_to_pf). What a connection counted after the last visit and before it was taken out of hardware - handed back to the host, reclaimed at its end, released from the Offloaded Flows page - went with it. os-quota counts a host's bytes from pf's states, and its phase 0 measured how much went (#1189). This change gives it to pf at the take-out, on both drivers, with what the fast path counted after its last statistics message.

A connection dropped by a cut, handed back when its address leaves the list. Measured, 2026-11-17

A cut drops a connection on the coprocessor by its verdict, and keeps it there while its sender goes on sending (measured 2026-10-23). Until this, nothing took it back by address when the cut was over - its address taken out of the list, the list unchosen, the plugin that cut it turned off: the connection stayed dropped until its sender stopped, or until it was handed back by hand on XGS: Offloaded Flows (found by the review of os-blocklists' phase 1).

A connection a rule sends by a gateway, kept on that gateway in hardware. Measured, 2026-11-17

A firewall rule can send a connection to a gateway of its own - OPNsense's Gateway on a pass rule, pf's route-to; and on a rule where connections come in, reply-to sends their replies back the way they came. Until this, a connection kept to its rule's gateway only while the host had it: once in hardware, both drivers took its next hop from the main routing table. Measured on the second XGS 3300 the same morning, before the fix: 11 MB by the rule's gateway, then 2.36 GB by the main route (#1182).

A CARP failover with a TCP connection in hardware: it dies without the numbers for pfsync and goes on with them, 2026-11-15

A planned failover between the second XGS 3300 and the XGS 136, with a TCP stream through them that the master carries in hardware and that began with the host, so that the backup's pfsync copy of it is strict. Before the numbers written for pfsync, the new master refused the connection and it died; with them it went on. A carp hook that empties the old master's hardware when it is master of nothing any more was measured too, and is a setting, off by default.

Inspection threads per port: four netmap rings give Suricata four threads a port, and five times the inspected rate where one thread was the limit, 2026-11-15

How many threads Suricata inspects a port with in IPS mode was nobody's setting. OPNsense's suricata.yaml leaves netmap's threads at auto, which Suricata 8.0 takes as one thread a netmap ring, and netmap's emulated adapter - the one the coprocessor's front ports get - has one ring unless dev.netmap.generic_rings says more. XGS: Settings now has Inspection threads per port, which sets those rings, and with them the threads.

The XGS 136's driver resolved a connection's original direction - toward its destination - with no port to fall back on, so a destination whose route names a lagg was refused, and the host forwarded the whole connection; the reply direction, to an opener behind a lagg, already took the port its own frames arrive on. Since the change the original direction takes the port the destination's own frames arrive on, for a lagg's route only and only when that port is one of the lagg's members (npuep_nhop_hint_fits), as the XGS 3300's driver does. A refused next hop is counted (flow.make_nonhop) and named in flow.accelerate's answer.

A lagg member lost on the second XGS 3300: connections in hardware sent into the dead port for up to half a minute, and taken back to the host now, 2026-11-15

With a lagg in LACP over the XGS 3300's Port3 and Port4, losing one member stalled connections (#1162). A direction in hardware leaves by the port chosen when it was made, and nothing moved it: while the member was gone, the connections with a direction leaving by it stayed in hardware, sending into the dead port and kept alive by the far side's own retransmissions, and after the port came back they waited out TCP's backed-off retransmission timer.

A switch socket's speed and duplex set from the XGS 136's side, 2026-11-15

The XGS 136's front ports offered autoselect alone, and a change of medium was accepted and ignored. Since the change a switch socket - Port1 to Port8, copper behind the switch - offers 10 and 100 half and full, 1000baseT full and autoselect, set by the network agent's KSETTINGS attribute (0x55) with what autonegotiation advertises in attribute 0x43, as on the second XGS 3300. The cages and Port9 to Port12 keep autoselect. The request is applied by the agent's link poll, as an MTU is (npunwa_media_apply); a set already in place is not sent again, since the agent takes the port down and up for it; half duplex is read beside the speed when the carrier comes up (attribute 0x0d), and the port's address is named to the switch again at every carrier up.

A switch socket's speed and duplex set from the second XGS 3300's side, 2026-11-15

The front ports offered autoselect alone, and a change of medium was accepted and ignored. The switch sockets' speed and duplex are set by the network agent's KSETTINGS attribute (0x55), the one the SDK's own host sends for an ethtool -s, with what autonegotiation advertises in attribute 0x43 (the attributes). Since the change a socket offers 10 and 100 half and full, 1000baseT full and autoselect (octep_dp_media_change), and a cage keeps autoselect.

pfsync to a peer: a UDP connection in hardware lost its state about a minute in, and keeps it now, 2026-11-15

With pfsync between two appliances, the state of a UDP connection the flow maker had put in hardware was replaced 60 to 70 seconds in (#1160). pfsync sends a state's update when pf passes one of its packets, and a connection in hardware passes none: the driver's keepalive refreshed the state's expiry by writing it, and pfsync never heard of it, so the peer's copy expired on udp.multiple (60 s) and the delete its expiry sent back removed the live state. Since the change the keepalive's refresh is handed to pfsync's own update, on the same state under the same lock (octep_pf_sync). That is the XGS 3300's driver: the XGS 136's keepalive did not refresh a state in hardware at all (below).