[pnfs] Patches

iyer at netapp.com iyer at netapp.com
Thu Apr 12 06:19:09 EDT 2007


From: iyer at netapp.com

Subject: Patches to extract the call/reply header from the rpc packet

Hi Guys,
Could you please take a look at these patches? These patches extract the call/reply header field from the rpc packet. The earlier code copied this as part of the "data" and verified if it was a reply in call_decode. This is only a client side patch.
Thanks
Regards
Rahul

Summary
-------
 include/linux/sunrpc/xprt.h |    2 +
 net/sunrpc/clnt.c           |    6 +----
 net/sunrpc/xprtsock.c       |   56 +++++++++++++++++++++++++++++++++++++-----
 3 files changed, 52 insertions(+), 12 deletions(-)

Patch Description
-----------------

[PATCH 1/8] Added XPRT_COPY_CALLDIR flag

This flag is used in the state machine implementation in xs_tcp_data_recv() to
read in the call/reply flag. This flag will be used to recognize whether the
rpc packet received is a reply to a call the client made or a callback from the
server received on the backchannel.

----
[PATCH 2/8] Added tcp_calldir to rpc_xprt to store the call/reply flag

Added tcp_calldir to the rpc_xprt struct. This field will store the call/reply
flag of the rpc packet received. This flag will be used to decide whether the
packet received is a reply to a rpc the client made or a callback from the
server received on the backchannel

----
[PATCH 3/8] Added a function to read the call/reply flag

Added a function xs_tcp_read_calldir() to read in the call/reply flag and store
it in xprt->tcp_calldir.

----
[PATCH 4/8] Changed xs_tcp_read_xid to read in call/reply flag next

Changed xs_tcp_read_xid to set the XPRT_COPY_CALLDIR flag instead of the
XPRT_COPY_DATA flag so that the state machine in xs_tcp_data_recv reads the
call/reply flag as a separate entity and not as a part of the "data"

----
[PATCH 5/8] Clear XPRT_COPY_CALLDIR in xs_tcp_check_recm

Since we're now reading the call/reply flag as a separate entity and not as
"data", we need to clear the XPRT_COPY_CALLDIR flag as well in xs_tcp_check_recm.

----
[PATCH 6/8] Changed xs_tcp_data_recv() to call xs_tcp_read_calldir()

Modified the state machine in xs_tcp_read_calldir() to call
xs_tcp_read_calldir() when the XPRT_COPY_CALLDIR is set. This enables the
call/reply flag to be read in as a separate entity and not as a part of the
"data"

----
[PATCH 7/8] Remove check for call/reply in call_verify

Removed the check for the call/verify flag in call_decode. This will be checked
in xs_tcp_read_request

----
[PATCH 8/8] Added check for call/reply flag to xs_tcp_read_request()

Added a check for the call/reply header to xs_tcp_read_request(). This check
will eventually be used to deal with callbacks coming in on the connection.

----


More information about the pNFS mailing list