PERFORCE change 113852 for review
Robert Watson
rwatson at FreeBSD.org
Thu Feb 1 18:15:19 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=113852
Change 113852 by rwatson at rwatson_cinnamon on 2007/02/01 18:14:51
Correct a bug in mbuf append mode, in which the offset into the
mbuf wasn't properly taken into account -- as a result, instead of
getting the next bit of the mbuf when crossing a page boundary,
you got the same bit of the mbuf.
Affected files ...
.. //depot/projects/zcopybpf/src/sys/net/bpf_zerocopy.c#10 edit
Differences ...
==== //depot/projects/zcopybpf/src/sys/net/bpf_zerocopy.c#10 (text+ko) ====
@@ -329,9 +329,9 @@
KASSERT(m != NULL,
("bpf_zerocopy_append_mbuf: end of mbuf chain"));
- count = min(m->m_len, len);
+ count = min(m->m_len - moffset, len);
count = min(count, PAGE_SIZE - poffset);
- bcopy(mtod(m, void *),
+ bcopy(mtod(m, u_char *) + moffset,
((u_char *)sf_buf_kva(zb->zb_pages[page])) + poffset,
count);
More information about the p4-projects
mailing list