Remove unneeded code from the zero-copy receive path.

Discussed with: gallatin@
Tested by: ken@
This commit is contained in:
Alan Cox 2004-12-10 04:49:13 +00:00
parent 00c948e4ce
commit c73e3e9223

View File

@ -887,7 +887,6 @@ soreceive_rcvoob(so, uio, flags)
do {
#ifdef ZERO_COPY_SOCKETS
if (so_zero_copy_receive) {
vm_page_t pg;
int disposable;
if ((m->m_flags & M_EXT)
@ -896,10 +895,6 @@ soreceive_rcvoob(so, uio, flags)
else
disposable = 0;
pg = PHYS_TO_VM_PAGE(vtophys(mtod(m, caddr_t)));
if (uio->uio_offset == -1)
uio->uio_offset =IDX_TO_OFF(pg->pindex);
error = uiomoveco(mtod(m, void *),
min(uio->uio_resid, m->m_len),
uio, disposable);
@ -1229,7 +1224,6 @@ dontblock:
SOCKBUF_UNLOCK(&so->so_rcv);
#ifdef ZERO_COPY_SOCKETS
if (so_zero_copy_receive) {
vm_page_t pg;
int disposable;
if ((m->m_flags & M_EXT)
@ -1238,12 +1232,6 @@ dontblock:
else
disposable = 0;
pg = PHYS_TO_VM_PAGE(vtophys(mtod(m, caddr_t) +
moff));
if (uio->uio_offset == -1)
uio->uio_offset =IDX_TO_OFF(pg->pindex);
error = uiomoveco(mtod(m, char *) + moff,
(int)len, uio,
disposable);