1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=138647

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 @@ 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);