Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Feb 2007 18:15:18 GMT
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 113852 for review
Message-ID:  <200702011815.l11IFIqB088006@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=113852

Change 113852 by rwatson@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);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702011815.l11IFIqB088006>