[ofiwg] Question about endpoints and passive endpoints

Hefty, Sean sean.hefty at intel.com
Mon Sep 19 15:24:01 PDT 2016


> From what I can tell from fi_endpoint.h and fi_cm.h, fid_pep and fid_ep
> share the method groups fi_ops_ep and fi_ops_cm.  It appears that in
> those methods, if fid_t is used, any endpoint can be used and if
> fid_pep is used, a passive endpoint must be used.

If fid_t is specified, then there may be other fabric identifiers which can be used.  For example, fi_ep_bind allows binding an active endpoint to either a CQ or counter object.  Type protection is provided where possible (e.g. fi_pep_bind only allows binding a passive endpoint.)

> If fid_ep is used, could a passive endpoint use it, or does it have to
> be a normal endpoint?

A normal endpoint must be used.

A good rule is to make sure that you never attempt to cast one fabric id to another.  That is, don't do this:

struct fid_pep *pep;
.... (struct fid_ep *) pep;  /* bad casting */

However, something like this is okay:

... &pep.fid;  /* get at the base fid object */

> Ive also noticed in methods like rx_ctx there are variables such as:
> fid_ep *sep.  Does this indicate only a scalable endpoint should be
> used?

Yes.  Scalable endpoints use the same data structure as normal endpoints (fid_ep).



More information about the ofiwg mailing list