• Chuck Lever's avatar
    SUNRPC: Move the svc_xdr_recvfrom tracepoint again · 5f39d271
    Chuck Lever authored
    Commit 156708ad ("SUNRPC: Move the svc_xdr_recvfrom()
    tracepoint") tried to capture the correct XID in the trace record,
    but this line in svc_recv:
    
    	rqstp->rq_xid = svc_getu32(&rqstp->rq_arg.head[0]);
    
    alters the size of rq_arg.head[0].iov_len. The tracepoint records
    the correct XID but an incorrect value for the length of the
    xdr_buf's head.
    
    To keep the trace callsites simple, I've created two trace classes.
    One assumes the xdr_buf contains a full RPC message, and the XID
    can be extracted from it. The other assumes the contents of the
    xdr_buf are arbitrary, and the xid will be provided by the caller.
    
    Currently there is only one user of each class, but I expect we will
    need a few more tracepoints using each class as time goes on.
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    5f39d271
svc_xprt.c 38 KB