• Home
  • Raw
  • Download

Lines Matching refs:nbytes

67 __be32 *xdr_encode_opaque_fixed(__be32 *p, const void *ptr, unsigned int nbytes)  in xdr_encode_opaque_fixed()  argument
69 if (likely(nbytes != 0)) { in xdr_encode_opaque_fixed()
70 unsigned int quadlen = XDR_QUADLEN(nbytes); in xdr_encode_opaque_fixed()
71 unsigned int padding = (quadlen << 2) - nbytes; in xdr_encode_opaque_fixed()
74 memcpy(p, ptr, nbytes); in xdr_encode_opaque_fixed()
76 memset((char *)p + nbytes, 0, padding); in xdr_encode_opaque_fixed()
91 __be32 *xdr_encode_opaque(__be32 *p, const void *ptr, unsigned int nbytes) in xdr_encode_opaque() argument
93 *p++ = cpu_to_be32(nbytes); in xdr_encode_opaque()
94 return xdr_encode_opaque_fixed(p, ptr, nbytes); in xdr_encode_opaque()
949 size_t nbytes) in xdr_get_next_encode_buffer() argument
955 if (nbytes > PAGE_SIZE) in xdr_get_next_encode_buffer()
957 if (xdr->buf->len + nbytes > xdr->buf->buflen) in xdr_get_next_encode_buffer()
960 frag2bytes = nbytes - frag1bytes; in xdr_get_next_encode_buffer()
988 xdr->buf->len += nbytes; in xdr_get_next_encode_buffer()
991 trace_rpc_xdr_overflow(xdr, nbytes); in xdr_get_next_encode_buffer()
1004 __be32 * xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes) in xdr_reserve_space() argument
1011 nbytes += 3; in xdr_reserve_space()
1012 nbytes &= ~3; in xdr_reserve_space()
1013 q = p + (nbytes >> 2); in xdr_reserve_space()
1015 return xdr_get_next_encode_buffer(xdr, nbytes); in xdr_reserve_space()
1018 xdr->iov->iov_len += nbytes; in xdr_reserve_space()
1020 xdr->buf->page_len += nbytes; in xdr_reserve_space()
1021 xdr->buf->len += nbytes; in xdr_reserve_space()
1038 int xdr_reserve_space_vec(struct xdr_stream *xdr, struct kvec *vec, size_t nbytes) in xdr_reserve_space_vec() argument
1053 while (nbytes) { in xdr_reserve_space_vec()
1055 thislen = min_t(size_t, nbytes, PAGE_SIZE - thislen); in xdr_reserve_space_vec()
1064 nbytes -= thislen; in xdr_reserve_space_vec()
1335 static __be32 * __xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes) in __xdr_inline_decode() argument
1337 unsigned int nwords = XDR_QUADLEN(nbytes); in __xdr_inline_decode()
1348 static __be32 *xdr_copy_to_scratch(struct xdr_stream *xdr, size_t nbytes) in xdr_copy_to_scratch() argument
1354 if (nbytes > xdr->scratch.iov_len) in xdr_copy_to_scratch()
1363 nbytes -= cplen; in xdr_copy_to_scratch()
1364 p = __xdr_inline_decode(xdr, nbytes); in xdr_copy_to_scratch()
1367 memcpy(cpdest, p, nbytes); in xdr_copy_to_scratch()
1370 trace_rpc_xdr_overflow(xdr, nbytes); in xdr_copy_to_scratch()
1384 __be32 * xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes) in xdr_inline_decode() argument
1388 if (unlikely(nbytes == 0)) in xdr_inline_decode()
1392 p = __xdr_inline_decode(xdr, nbytes); in xdr_inline_decode()
1395 return xdr_copy_to_scratch(xdr, nbytes); in xdr_inline_decode()
1397 trace_rpc_xdr_overflow(xdr, nbytes); in xdr_inline_decode()
1647 unsigned int nbytes) in xdr_stream_subsegment() argument
1651 if (xdr_buf_subsegment(xdr->buf, subbuf, xdr_stream_pos(xdr), nbytes)) in xdr_stream_subsegment()