summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2004-12-08 05:25:08 +0000
committeralc <alc@FreeBSD.org>2004-12-08 05:25:08 +0000
commitcdb92b391789367b6d389c194b0f7150be67ef2e (patch)
tree8e6eb98c0a3bc72cdb3b35a7a3817a58e32d86dd /sys
parent40ad9ef99b3710fb0bc82a9cf74c9fed15ad668e (diff)
downloadFreeBSD-src-cdb92b391789367b6d389c194b0f7150be67ef2e.zip
FreeBSD-src-cdb92b391789367b6d389c194b0f7150be67ef2e.tar.gz
Tidy up the zero-copy receive path: Remove an unneeded argument to
uiomoveco() and userspaceco().
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_subr.c9
-rw-r--r--sys/kern/uipc_socket.c5
-rw-r--r--sys/sys/uio.h3
3 files changed, 6 insertions, 11 deletions
diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c
index 48c3af4..a1c90fd 100644
--- a/sys/kern/kern_subr.c
+++ b/sys/kern/kern_subr.c
@@ -211,8 +211,7 @@ uiomove_frombuf(void *buf, int buflen, struct uio *uio)
* Experimental support for zero-copy I/O
*/
static int
-userspaceco(void *cp, u_int cnt, struct uio *uio, struct vm_object *obj,
- int disposable)
+userspaceco(void *cp, u_int cnt, struct uio *uio, int disposable)
{
struct iovec *iov;
int error;
@@ -220,7 +219,6 @@ userspaceco(void *cp, u_int cnt, struct uio *uio, struct vm_object *obj,
iov = uio->uio_iov;
if (uio->uio_rw == UIO_READ) {
if ((so_zero_copy_receive != 0)
- && (obj == NULL)
&& ((cnt & PAGE_MASK) == 0)
&& ((((intptr_t) iov->iov_base) & PAGE_MASK) == 0)
&& ((uio->uio_offset & PAGE_MASK) == 0)
@@ -254,8 +252,7 @@ userspaceco(void *cp, u_int cnt, struct uio *uio, struct vm_object *obj,
}
int
-uiomoveco(void *cp, int n, struct uio *uio, struct vm_object *obj,
- int disposable)
+uiomoveco(void *cp, int n, struct uio *uio, int disposable)
{
struct iovec *iov;
u_int cnt;
@@ -283,7 +280,7 @@ uiomoveco(void *cp, int n, struct uio *uio, struct vm_object *obj,
if (ticks - PCPU_GET(switchticks) >= hogticks)
uio_yield();
- error = userspaceco(cp, cnt, uio, obj, disposable);
+ error = userspaceco(cp, cnt, uio, disposable);
if (error)
return (error);
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index b741f41..7982dea 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -902,8 +902,7 @@ soreceive_rcvoob(so, uio, flags)
error = uiomoveco(mtod(m, void *),
min(uio->uio_resid, m->m_len),
- uio, pg->object,
- disposable);
+ uio, disposable);
} else
#endif /* ZERO_COPY_SOCKETS */
error = uiomove(mtod(m, void *),
@@ -1246,7 +1245,7 @@ dontblock:
uio->uio_offset =IDX_TO_OFF(pg->pindex);
error = uiomoveco(mtod(m, char *) + moff,
- (int)len, uio,pg->object,
+ (int)len, uio,
disposable);
} else
#endif /* ZERO_COPY_SOCKETS */
diff --git a/sys/sys/uio.h b/sys/sys/uio.h
index f89c9c4..9dd827f 100644
--- a/sys/sys/uio.h
+++ b/sys/sys/uio.h
@@ -94,8 +94,7 @@ int uiomove(void *cp, int n, struct uio *uio);
int uiomove_frombuf(void *buf, int buflen, struct uio *uio);
int uiomove_fromphys(struct vm_page *ma[], vm_offset_t offset, int n,
struct uio *uio);
-int uiomoveco(void *cp, int n, struct uio *uio, struct vm_object *obj,
- int disposable);
+int uiomoveco(void *cp, int n, struct uio *uio, int disposable);
#else /* !_KERNEL */
OpenPOWER on IntegriCloud