Download raw body.
SoftLRO diff for cnmac/octeon
On Tue, 07 Apr 2026 20:03:44 +0200,
Janne Johansson <icepic.dz@gmail.com> wrote:
>
> > > 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.
>
I just mimic that condition:
if (__predict_true(!ISSET(word2, PIP_WQE_WORD2_IP_NI))) {
but, frankly, I almost sure that you can't measure impact of any
__predict_true, it is noise and I'd like follow Visa suggestion.
--
wbr, Kirill
SoftLRO diff for cnmac/octeon