From c73e3e922394c58a1068a32cc9d4d929e7110ce0 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Fri, 10 Dec 2004 04:49:13 +0000 Subject: [PATCH] Remove unneeded code from the zero-copy receive path. Discussed with: gallatin@ Tested by: ken@ --- sys/kern/uipc_socket.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 7982deac959a..8b04ec6913bd 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -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 @@ soreceive(so, psa, uio, mp0, controlp, flagsp) 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 @@ soreceive(so, psa, uio, mp0, controlp, flagsp) 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);