Port-xen archive

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

Re: NetBSD/xen network problems (need help)



> I think setting m_len to 0 will cause the m_copyback() to add a second mbuf to
> the chain to store the data, leaving the first one with a NULL size.

yes, it's why i said "the minimal fix". :-)

it's also trivial to make m_copyback to use trailing space of
the given mbuf if any.  but let's fix the problem first,
and then optimize it.

> Now, it seems that m_copyback() adjust m->m_pkthdr.len, but not m->m_len.
> Should it ? It so, adding
>                       m->m_len = m->m_pkthdr.len;
> after the call to m_copyback() should be enough.

i'd say the mbuf chain is "broken" unless m->m_pkthdr.len is the sum of
m->m_len in the chain.

besides, i don't think it's a good idea to assume that
the result of m_copyback is a single mbuf.

YAMAMOTO Takashi



Home | Main Index | Thread Index | Old Index