CSUM_TSO question...

Ermal Luçi ermal.luci at gmail.com
Tue Feb 23 10:34:10 UTC 2010


Hello all,
i was reading ip_output() code today and stumbled accross this
http://fxr.watson.org/fxr/source/netinet/ip_output.c#L587.

Can anybody shad any light on the check being done ?
(m->m_pkthdr.csum_flags & ifp->if_hwassist & CSUM_TSO) != 0 ||

Shouldn't it be just
(m->m_pkthdr.csum_flags & CSUM_TSO) != 0 ||
or it shold be
(ifp->if_hwassist & CSUM_TSO) != 0 ||

while just a few lines above the following computation is done
m->m_pkthdr.csum_flags &= ifp->if_hwassist;

I am not sure how the compiler interprets it and it might be right
though reading it is somewhat not clear what is going on.

Is this correct?

Regards,
--
Ermal


More information about the freebsd-net mailing list