HomeFreeBSD

lro: move pkt rejection checks to leafs to avoid queueing non-LRO'able pkts

Description

lro: move pkt rejection checks to leafs to avoid queueing non-LRO'able pkts

When lro mbuf queuing is enabled, we should not queue easily
reject-able packets. Queuing them does a bit of extra work (sorting,
timestamps) and can potentially delay urgent packets such as LACP
PDUs. This change moves simple rejection tests from lro_rx_common()
into lro_rx and (more importantly) into tcp_lro_queue_mbuf().

Note this change only moves the easy checks on forwarding and packet
metadata, where the rejection criteria is already hot in cache. It
does not move parsing and looking inside the packet to verify the
ether protocol, ip protocol, etc. This could be done, but we risk
essentially doubling the cache misses per-packet by doing so.

Differential Revision: https://reviews.freebsd.org/D56337
Reviewed by: rrs, tuexen
Sponsored by: Netflix

Details

Provenance
gallatinAuthored on Apr 13 2026, 9:33 PM
Reviewer
rrs
Differential Revision
D56337: lro: move packet rejection checks out of lro_rx_common to avoid queueing non-LRO'able packets
Parents
rG963f1a5455c9: ifconfig: add CMIS support for 400GbE optics
Branches
Unknown
Tags
Unknown