[OpenAFS-devel] When is an AFS request-response completed?

Nickolai Zeldovich kolya@MIT.EDU
Fri, 02 Nov 2001 20:56:01 -0500


> I used the mentioned document to help out with determining the tuple of
> (epoch, cid, callNumber) for uniquely identifying the client's request.
> It was extremely helpful in that regard.

Ah, cool.  Glad to see it's helpful in some way :-)

> The next question becomes, how are the responses to a request identified?

The short answer is, I believe, "the response must come back on the same
Rx connection and channel, and have the same call number".

When a client wants to make an Rx call over an existing Rx connection, it
allocates an available channel to that call, and a new call number within
that channel.  The first packet then goes out on that channel with the new
call number, and this informs the server that this channel is in use again.

Once the client has finished sending its data on that channel, the server
can switch into sending mode, and send the response back, over the same
channel.  Since Rx channels exist in the context of an Rx connection, the
response packets must come back on the same Rx connection (identified by
epoch/CID) and channel (identified by the lower two bits of CID).  The
call number must also stay the same on all the packets associated with
this Rx call.

> From other sources, I have come to believe that the a client's requests
> are uniquely identified by three fields of the Rx header: epoch, cid,
> callNumber.

That's almost the case; the channel number must also be included for this
to be unique.  (I guess it's part of CID, if you look at all 32 bits.)
Since call numbers are allocated per-channel, I could have call # 2 on
channel 1 and call # 2 on channel 3 at the same time.

Hope that helps,

-- kolya