Skip to contentSkip to conversation

RPC Question

DISCUSSION Usman S. Ansari 2 participants 2 messages Apr 17, 2008 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello, I am modifying Linux sunrpc code to work with TOE (TCP offload engine). I have a question about tcp_data_recv function.

What does flags XPRT_COPY_RECM, XPRT_COPY_XID & XPRT_COPY_DATA mean ? and where can I get description of tcp_read_fraghdr, tcp_read_xid and tcp_read_request.

If there is any sort of documentaion or flow please let me know.

Thanks

Usman

A message that is not in the archive (sent off-list or not yet received): 969249.1309.qm-YaqxewpK01+B9c0Qi4KiSl5cfvJIxWXgQQ4Iyu8u01E@public.gmane.org

#2 lore raw
Quoted 5 lines · Usman S. Ansari

Hello, I am modifying Linux sunrpc code to work with TOE (TCP offload engine). I have a question about tcp_data_recv function.

What does flags XPRT_COPY_RECM, XPRT_COPY_XID & XPRT_COPY_DATA mean ? and where can I get description of tcp_read_fraghdr, tcp_read_xid and tcp_read_request.

If there is any sort of documentaion or flow please let me know.

You've got the original source code right there; why would you need extra documentation?

Anyhow, the flags XPRT_COPY_* all label different states when reading an RPC reply from the server:

* XPRT_COPY_RECM means that we're looking for the record marking word in order to figure out how long the datagram is.

* XPRT_COPY_XID, means we're looking for the request's XID, which will allow us to find the original RPC call for which this is the reply.

* Finally, when in the XPRT_COPY_DATA state, the rest of the datagram can be copied into the reply xdr_buf.

Trond