On Thu, 18 Feb 2010, KIYOHARA Takashi wrote:

+       if (m->m_pkthdr.len & 0x1) {
+               m_copyback(m, m->m_pkthdr.len, 1, &dtlh.rsvd);  /* Add pad */

I wonder if handling this pad byte separately would be useful?

The reason I ask, is that as far as I recall, m_copyback() does always
extend the mbuf chain for additions such as this, even when there was some
trailing space (you might need to check, if this is still the case) and
you could perhaps optimise by not doing that..

regards,
iain


Reply via email to