From: Janne Johansson Subject: Re: SoftLRO diff for cnmac/octeon To: Visa Hankala Cc: "Kirill A. Korinsky" , tech@openbsd.org Date: Tue, 7 Apr 2026 20:03:44 +0200 > > ifp->if_xflags = IFXF_MPSAFE; > > +#ifndef SMALL_KERNEL > > + ifp->if_xflags |= IFXF_LRO; > > +#endif > > ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_CSUM_TCPv4 | > > IFCAP_CSUM_UDPv4 | IFCAP_CSUM_TCPv6 | IFCAP_CSUM_UDPv6; > > +#ifndef SMALL_KERNEL > > + ifp->if_capabilities |= IFCAP_LRO; > > +#endif > > > > > > - ml_enqueue(ml, m); > > +#ifndef SMALL_KERNEL > > + if (__predict_true(ISSET(ifp->if_xflags, IFXF_LRO)) && > > + __predict_true(!ISSET(word2, PIP_WQE_WORD2_IP_NI)) && > > I would leave these branch hints out as they mainly add visual noise > here. Also, the predict true hint does not seem correct with IFXF_LRO > because it is a valid admin choice to not use LRO. It is a valid choice to turn it off, but it defaults to on for cnmac(4) devices. Then if compiler prediction hints have any measurable effect is another matter, but it would be the "correct" hint for a lot of installations if this diff goes in. -- May the most significant bit of your life be positive.