Rename m_unmappedtouio() to m_unmapped_uiomove().
This function doesn't only copy data into a uio but instead is a variant of uiomove() similar to uiomove_fromphys(). Reviewed by: gallatin, markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30444
This commit is contained in:
parent
3f9dac85cc
commit
aa341db39b
@ -628,8 +628,8 @@ m_copyfromunmapped(const struct mbuf *m, int off, int len, caddr_t cp)
|
||||
uio.uio_iovcnt = 1;
|
||||
uio.uio_offset = 0;
|
||||
uio.uio_rw = UIO_READ;
|
||||
error = m_unmappedtouio(m, off, &uio, len);
|
||||
KASSERT(error == 0, ("m_unmappedtouio failed: off %d, len %d", off,
|
||||
error = m_unmapped_uiomove(m, off, &uio, len);
|
||||
KASSERT(error == 0, ("m_unmapped_uiomove failed: off %d, len %d", off,
|
||||
len));
|
||||
}
|
||||
|
||||
@ -1157,8 +1157,8 @@ m_copytounmapped(const struct mbuf *m, int off, int len, c_caddr_t cp)
|
||||
uio.uio_iovcnt = 1;
|
||||
uio.uio_offset = 0;
|
||||
uio.uio_rw = UIO_WRITE;
|
||||
error = m_unmappedtouio(m, off, &uio, len);
|
||||
KASSERT(error == 0, ("m_unmappedtouio failed: off %d, len %d", off,
|
||||
error = m_unmapped_uiomove(m, off, &uio, len);
|
||||
KASSERT(error == 0, ("m_unmapped_uiomove failed: off %d, len %d", off,
|
||||
len));
|
||||
}
|
||||
|
||||
@ -1899,7 +1899,7 @@ m_uiotombuf(struct uio *uio, int how, int len, int align, int flags)
|
||||
* Copy data to/from an unmapped mbuf into a uio limited by len if set.
|
||||
*/
|
||||
int
|
||||
m_unmappedtouio(const struct mbuf *m, int m_off, struct uio *uio, int len)
|
||||
m_unmapped_uiomove(const struct mbuf *m, int m_off, struct uio *uio, int len)
|
||||
{
|
||||
vm_page_t pg;
|
||||
int error, i, off, pglen, pgoff, seglen, segoff;
|
||||
@ -1970,7 +1970,7 @@ m_mbuftouio(struct uio *uio, const struct mbuf *m, int len)
|
||||
length = min(m->m_len, total - progress);
|
||||
|
||||
if ((m->m_flags & M_EXTPG) != 0)
|
||||
error = m_unmappedtouio(m, 0, uio, length);
|
||||
error = m_unmapped_uiomove(m, 0, uio, length);
|
||||
else
|
||||
error = uiomove(mtod(m, void *), length, uio);
|
||||
if (error)
|
||||
|
@ -2198,7 +2198,8 @@ soreceive_generic(struct socket *so, struct sockaddr **psa, struct uio *uio,
|
||||
SBLASTMBUFCHK(&so->so_rcv);
|
||||
SOCKBUF_UNLOCK(&so->so_rcv);
|
||||
if ((m->m_flags & M_EXTPG) != 0)
|
||||
error = m_unmappedtouio(m, moff, uio, (int)len);
|
||||
error = m_unmapped_uiomove(m, moff, uio,
|
||||
(int)len);
|
||||
else
|
||||
error = uiomove(mtod(m, char *) + moff,
|
||||
(int)len, uio);
|
||||
|
@ -833,7 +833,6 @@ struct mbuf *m_getm2(struct mbuf *, int, int, short, int);
|
||||
struct mbuf *m_getptr(struct mbuf *, int, int *);
|
||||
u_int m_length(struct mbuf *, struct mbuf **);
|
||||
int m_mbuftouio(struct uio *, const struct mbuf *, int);
|
||||
int m_unmappedtouio(const struct mbuf *, int, struct uio *, int);
|
||||
void m_move_pkthdr(struct mbuf *, struct mbuf *);
|
||||
int m_pkthdr_init(struct mbuf *, int);
|
||||
struct mbuf *m_prepend(struct mbuf *, int, int);
|
||||
@ -843,6 +842,8 @@ struct mbuf *m_pullup(struct mbuf *, int);
|
||||
int m_sanity(struct mbuf *, int);
|
||||
struct mbuf *m_split(struct mbuf *, int, int);
|
||||
struct mbuf *m_uiotombuf(struct uio *, int, int, int, int);
|
||||
int m_unmapped_uiomove(const struct mbuf *, int, struct uio *,
|
||||
int);
|
||||
struct mbuf *m_unshare(struct mbuf *, int);
|
||||
int m_snd_tag_alloc(struct ifnet *,
|
||||
union if_snd_tag_alloc_params *, struct m_snd_tag **);
|
||||
|
Loading…
Reference in New Issue
Block a user