YAMAMOTO Takashi
2008-01-23 14:09:23 UTC
[ moved from source-changes ]
hi,
approach. Can we use two flags please, one to annotate that the current
mbuf is external, but not mapped and one to annotate that this mbuf
chain might have such a mapping? That way we can keep the complexity out
of a few routines and have a simple
if (mbuf_chain_is_lazy(m)) map_mbuf_chain(m)
at the beginning of the glue code e.g. for in_cksum. I would expect this
to apply to a few other cases where we just have to deal with the whole
mbuf anyway.
Joerg
in_cksum is often used for the header portion of a chain.
ie. not the whole chain.
otoh in{4,6}_cksum can benefit from mbuf_chain_is_lazy.
however in_cksum and in{4,6}_cksum shares the body of the code on i386.
i think there are pros and cons.
assuming "lazy" mbufs are rather rare, it probably saves
some code and cycles.
btw, i'm not quite happy with the current approach (the check in mtod) either
because, while it makes changes in the network stack minimum, it increases
code size much. any suggestions are welcome.
YAMAMOTO Takashi
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
hi,
remove __HAVE_LAZY_MBUF for now as it's incompatible with in_cksum.S.
Having read the necessary changes, I am not sure I like the currentapproach. Can we use two flags please, one to annotate that the current
mbuf is external, but not mapped and one to annotate that this mbuf
chain might have such a mapping? That way we can keep the complexity out
of a few routines and have a simple
if (mbuf_chain_is_lazy(m)) map_mbuf_chain(m)
at the beginning of the glue code e.g. for in_cksum. I would expect this
to apply to a few other cases where we just have to deal with the whole
mbuf anyway.
Joerg
ie. not the whole chain.
otoh in{4,6}_cksum can benefit from mbuf_chain_is_lazy.
however in_cksum and in{4,6}_cksum shares the body of the code on i386.
i think there are pros and cons.
assuming "lazy" mbufs are rather rare, it probably saves
some code and cycles.
btw, i'm not quite happy with the current approach (the check in mtod) either
because, while it makes changes in the network stack minimum, it increases
code size much. any suggestions are welcome.
YAMAMOTO Takashi
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de