tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: [yamt-lazymbuf] src/sys/arch/amd64/include

[ moved from source-changes ]


> On Mon, Jan 21, 2008 at 10:43:12AM +0000, YAMAMOTO Takashi wrote:
> > Log Message:
> > 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 current
> 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.


Home | Main Index | Thread Index | Old Index