@@ -1507,7 +1507,7 @@
);
#define DEFINE_SEGMENT_EVENT(name) \
- DEFINE_EVENT(svcrdma_segment_event, svcrdma_encode_##name,\
+ DEFINE_EVENT(svcrdma_segment_event, svcrdma_##name,\
TP_PROTO( \
u32 handle, \
u32 length, \
@@ -1515,8 +1515,9 @@
), \
TP_ARGS(handle, length, offset))
-DEFINE_SEGMENT_EVENT(rseg);
-DEFINE_SEGMENT_EVENT(wseg);
+DEFINE_SEGMENT_EVENT(decode_wseg);
+DEFINE_SEGMENT_EVENT(encode_rseg);
+DEFINE_SEGMENT_EVENT(encode_wseg);
DECLARE_EVENT_CLASS(svcrdma_chunk_event,
TP_PROTO(
@@ -420,13 +420,19 @@ static __be32 *xdr_check_write_chunk(__be32 *p, const __be32 *end,
segcount = be32_to_cpup(p++);
for (i = 0; i < segcount; i++) {
- p++; /* handle */
- if (be32_to_cpup(p++) > maxlen)
+ u32 handle, length;
+ u64 offset;
+
+ handle = be32_to_cpup(p++);
+ length = be32_to_cpup(p++);
+ if (length > maxlen)
return NULL;
- p += 2; /* offset */
+ p = xdr_decode_hyper(p, &offset);
if (p > end)
return NULL;
+
+ trace_svcrdma_decode_wseg(handle, length, offset);
}
return p;
Ensure clients send large enough Write chunks. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> --- include/trace/events/rpcrdma.h | 7 ++++--- net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 12 +++++++++--- 2 files changed, 13 insertions(+), 6 deletions(-)