Skip to content

core/api: Introduce fi_rpc #10965

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

core/api: Introduce fi_rpc #10965

wants to merge 3 commits into from

Conversation

j-xiong
Copy link
Contributor

@j-xiong j-xiong commented Apr 15, 2025

An RPC transaction consists of the client sending a request to the server, and the server sending back the response into the response buffer supplied by the client when the request was sent.

RPC operations can be built on top of existing point-to-point data transfer operations, including base messaging, tagged messaging, and RMA. One of the implementations uses base messaging for sending the request and tagged messaging with exact match for sending the response. One implication of such implementation is that the response messages should always arrive expected. In another word, if a reponse can not find a match it must be a stale message and can be safely dropped. However, currently the providers don't have a good way to obtain such information. As a result, those stale messages have to be kept indefinitely, hogging the resource, and negatively impacting the performance.

Having a dedicated RPC API allows the provider to understand the semanatics and perform optimizations when approciate.

The RPC API consist a set of calls to send RPC requests, a set of calls to send RPC response, a call to discard RPC requests, and a new CQ format to delivey RPC request meta data via completion entries. The content of the request and response are defined by the user.

Workflow of an RPC transacction:

Cleint:

  • prepare request buffer
  • fi_rpc

Server:

  • fi_recv
  • get completion (for fi_recv)
  • check cqe.flags & FI_RPC
  • get rpc_id and timeout from cqe
  • process the received buffer ==> prepare response
  • fi_rpc_resp
  • get completion (for fi_rpc_resp)

Client:

  • get completion (for fi_rpc)
  • process the received response

A new primary capability FI_RPC is defined. It is also a flag used in completion entries indicating that the completed receive contains an RPC request.

@belynam
Copy link
Contributor

belynam commented Apr 15, 2025

@j-xiong Per discussion in today's OFIWG meeting, I have created #10966 to alter struct fi_opx_endpoint with a new rpc_reserved field that can be removed to allow for the larger size of struct fid_ep.

@j-xiong j-xiong force-pushed the fi_rpc branch 5 times, most recently from 2e9e484 to 6917074 Compare April 16, 2025 16:46
Copy link
Member

@shefty shefty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to examine RPC calls not having an fi_addr_t as input.

j-xiong added 3 commits April 16, 2025 12:53
An RPC transaction consists of the client sending a request to the server,
and the server sending back the response into the response buffer supplied
by the client when the request was sent.

RPC operations can be built on top of existing point-to-point data transfer
operations, including base messaging, tagged messaging, and RMA. One of the
implementations uses base messaging for sending the request and tagged
messaging with exact match for sending the response. One implication of such
implementation is that the response messages should always arrive expected.
In another word, if a reponse can not find a match it must be a stale message
and can be safely dropped. However, currently the providers don't have a good
way to obtain such information. As a result, those stale messages have to be
kept indefinitely, hogging the resource, and negatively impacting the performance.

Having a dedicated RPC API allows the provider to understand the semanatics
and perform optimizations when approciate.

The RPC API consist a set of calls to send RPC requests, a set of calls to
send RPC response, a call to discard RPC requests, and a new CQ format to
delivey RPC request meta data via completion entries.  The content of the
request and response are defined by the user.

Workflow of an RPC transacction:

Cleint:
	prepare request buffer
	fi_rpc

Server:
	fi_recv
	get completion (for fi_recv)
	check cqe.flags & FI_RPC
	get rpc_id and timeout from cqe
	process the received buffer ==> prepare response
	fi_rpc_resp
	get completion (for fi_rpc_resp)

Client:
	get completion (for fi_rpc)
	process the received response

A new primary capability FI_RPC is defined. It is also a flag used in completion
entries indicating that the completed receive contains an RPC request.

Signed-off-by: Jianxin Xiong <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants