[email protected]
[Top] [All Lists]

PERFORCE change 113852 for review

Subject: PERFORCE change 113852 for review
From: Robert Watson
Date: Thu, 1 Feb 2007 18:15:18 GMT
http://perforce.freebsd.org/chv.cgi?CH=113852

Change 113852 by [email protected]_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);
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/p4-projects
To unsubscribe, send any mail to "[email protected]"

<Prev in Thread] Current Thread [Next in Thread>
  • PERFORCE change 113852 for review, Robert Watson <=