43 #include <linux/sunrpc/debug.h>
44 #include <asm/unaligned.h>
48 #define RPCDBG_FACILITY RPCDBG_SVCXPRT
64 (
unsigned long)vaend) {
65 dprintk(
"svcrdma: vaend=%p, ch=%p\n", vaend, ch);
78 int *ch_count,
int *byte_count)
85 *ch_count = *ch_count + 1;
111 (unsigned long)vaend) {
112 dprintk(
"svcrdma: ary=%p, vaend=%p\n", ary, vaend);
116 if (((
unsigned long)&ary->
wc_array[0] +
118 (
unsigned long)vaend) {
119 dprintk(
"svcrdma: ary=%p, wc_nchunks=%d, vaend=%p\n",
120 ary, nchunks, vaend);
127 return (
u32 *)&ary->
wc_array[nchunks].wc_target.rs_length;
130 static u32 *decode_reply_array(
u32 *va,
u32 *vaend)
141 (unsigned long)vaend) {
142 dprintk(
"svcrdma: ary=%p, vaend=%p\n", ary, vaend);
146 if (((
unsigned long)&ary->
wc_array[0] +
148 (
unsigned long)vaend) {
149 dprintk(
"svcrdma: ary=%p, wc_nchunks=%d, vaend=%p\n",
150 ary, nchunks, vaend);
168 dprintk(
"svcrdma: header too short = %d\n",
191 rqstp->
rq_arg.head[0].iov_base =
va;
192 hdrlen = (
u32)((
unsigned long)va - (
unsigned long)rmsgp);
194 if (hdrlen > rqstp->
rq_arg.len)
203 vaend = (
u32 *)((
unsigned long)rmsgp + rqstp->
rq_arg.len);
204 va = decode_read_list(va, vaend);
207 va = decode_write_list(va, vaend);
210 va = decode_reply_array(va, vaend);
214 rqstp->
rq_arg.head[0].iov_base =
va;
215 hdr_len = (
unsigned long)va - (
unsigned long)rmsgp;
230 dprintk(
"svcrdma: processing deferred RDMA header on rqstp=%p\n",
237 rqstp->
rq_arg.head[0].iov_base =
va;
238 hdrlen = (
u32)((
unsigned long)va - (
unsigned long)rmsgp);
271 rqstp->
rq_arg.head[0].iov_base =
va;
272 hdrlen = (
unsigned long)va - (
unsigned long)rmsgp;
294 return (
int)((
unsigned long)va - (
unsigned long)startp);
322 return (
unsigned long) wr_ary - (
unsigned long) rmsgp;
339 ary->
wc_array[chunks].wc_target.rs_handle = xdr_zero;
342 ary->
wc_array[chunks].wc_target.rs_length = xdr_zero;